Skip to content

Expose SPContentTypeEntityData so we can use ParentContentTypeId #3276

@patrick-rodgers

Description

@patrick-rodgers

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

When creating a new content type via REST we do a post to the collection with a set of data. These parameters are defined by the SPContentTypeEntityData in the source code, however this type cannot be resolved (see observed behavior). It is expected that we could call the method with the defined type using all the properties.

Ideally we could create a new content type and specify the entire new content type id, but that is a bigger change.

Observed Behavior

If you make the POST request with a plain object with a metadata type of "SP.ContentTypeEntityData", "SPContentTypeEntityData", or "ContentTypeEntityData" you get an error below:

{"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"A type named 'ContentTypeEntityData' could not be resolved by the model. When a model is available, each type name must resolve to a valid type."}}}

Steps to Reproduce

Craft a POST request to the rest API and try to specify ParentContentTypeId in that data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APIstatus:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:archive-old-issueIssues which are closed as tool old for active work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions