Forum Discussion
omkar kuchekar
May 19, 2017Copper Contributor
How to Provision Site Columns and Content Types using Provisioning Template by Patterns and Practice
Hi All, I would like to add site columns and content type using PnP provisioning schema xml template. I need XML format for this like sitefields. I am using below xml but it doesnt creating any s...
- May 19, 2017Yes got the solution. adding existing site column to list as below.
<pnp:FieldRefs>
<pnp:FieldRef ID="baf7091c-01fb-4831-a975-08254f87f234" Name="Non-Working Day" DisplayName="Non-Working Day"></pnp:FieldRef>
</pnp:FieldRefs>
omkar kuchekar
May 19, 2017Copper Contributor
Yes its correct. but i need to add column to list from existing site columns using PnP provisioning schema.With above xml we can add new column to list.Let me corrrect if i am wrong.
omkar kuchekar
May 19, 2017Copper Contributor
Yes got the solution. adding existing site column to list as below.
<pnp:FieldRefs>
<pnp:FieldRef ID="baf7091c-01fb-4831-a975-08254f87f234" Name="Non-Working Day" DisplayName="Non-Working Day"></pnp:FieldRef>
</pnp:FieldRefs>
<pnp:FieldRefs>
<pnp:FieldRef ID="baf7091c-01fb-4831-a975-08254f87f234" Name="Non-Working Day" DisplayName="Non-Working Day"></pnp:FieldRef>
</pnp:FieldRefs>
- omkar kuchekarMay 19, 2017Copper ContributorFor adding existing content type
<pnp:ContentTypeBindings>
<pnp:ContentTypeBinding ContentTypeID="0x0101" />
</pnp:ContentTypeBindings>- May 19, 2017
The easiest way to do this is to simply export an existing site after you created the fields and content types manually.
Also, if you use Visual Studio you can enable Intellisense. Follow these steps:
https://veenstra.me.uk/2015/12/10/office-365sharepoint-2013-enable-intellisense-of-officedevpnp/
- omkar kuchekarMay 19, 2017Copper ContributorBut while exporting i am not able to get sitefields,content types so dont know is there any setting or something.I tried adding new site column and exporting but still no sitefields present in XML.
Below link not working.
https://veenstra.me.uk/2015/12/10/office-365sharepoint-2013-enable-intellisense-of-officedevpnp/