Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance 'ContentTypeDefinition' provision - add parent content type name prop #737

Closed
SubPointSupport opened this issue Nov 16, 2015 · 4 comments

Comments

@SubPointSupport
Copy link
Contributor

It would be nice if M2 has parent content type name prop. In some scenarios only a content type name is known, not the ID.

In my scenario I only know the name of the content type. Id may differ between environments. That's why I think it would be good to have an option to provide parent content type name, not Id, when specifying ContentTypeDefinition instance.

https://www.yammer.com/spmeta2feedback/#/Threads/show?threadId=611988702

[DONE] Implementation - #782
[DONE] Merge
[DONE] Regresion tests

@andreasblueher
Copy link
Contributor

I would like to implement this enhancement, however I'm not 100% sure on how you wanted to achieve this change. If no parent content type id is provided but a name, would you search for a site content type with the given name and use it's content type id?

@SubPointSupport
Copy link
Contributor Author

Indeed. ContentTypeId takes priority, the ContentTypeName is a fall back in case ContentTypeId has not been provided and the resolution should work by name.

Resolution by name simplifies scenarios where M2 models work with the 'already excising stuff created by users'. Not a common scenarios, yet nice to have.

@andreasblueher
Copy link
Contributor

Alright and is there a reason why you don't specify ParentContenttype when creating a new ct in CSOM? Does SharePoint through merged content type id recognize which parent it is?

@SubPointSupport
Copy link
Contributor Author

Exactly, it recognizes the parent by the ID lookup.

SubPointSupport added a commit that referenced this issue Feb 29, 2016
… name prop #737

+ added CanDeploy_CustomDocumentContentType_ByParentName / CanDeploy_CustomListItemContentType_ByParentName
+ preliminary CSOM testing 1.2.60 done
SubPointSupport added a commit that referenced this issue Mar 1, 2016
…ltListViewWebPart_As_GridView

+ SSOM/CSOM tests for Enhance 'ContentTypeDefinition' provision - add parent content type name prop #737
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants