Forum Discussion
Matthew McDermott
Jul 22, 2017Copper Contributor
Enterprise Content Types and PNP Provisioning
Are there any special considerations for PNP Provisioning of Lists when using Enterprise Content Types? I see that I can use PNP to create the content type in the Content Type Hub by getting a reference with:
Get‑PnPContentTypePublishingHubUrl
Then I can Publish the content type manually.
What I am wondering is when provisioning the site and then creating associated lists with the Content Type ID of the Enterprise Content Type is there anything I need to plan for in my template?
4 Replies
Sort By
- Anonymous
Good question at the moment i am removing things from contenttype hub and move it in to 1 site if needed.
Have not yet tested this functionality. But i imagine that when you create the sitecollection the contenttype hub is published after that pnp kicks in. But could be wrong here.
- Matthew McDermottCopper Contributor
Paul,
Thanks! My first test was a success, though the site had been running for a day or so. This would mean that the Enterprise Content Type was present on the site. I'll do a bit more testing later this week to see if there is an issue of timing following provisioning. I may just have to test the site for the Content Type prior to continuing with my code.
- David GroomsCopper Contributor
As long as the source of the pnp file and the target are in the same tenant, not a problem.
The content types from the hub will be in the site before the PnP file is processed.
If the pnp is from a different tenant then the Guids won't match and you'll get duplicate field errors,
Dave