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>
Deleted
May 19, 2017how does the rest of your xml look?
<Field Type="Text" DisplayName="Document Number" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255" Group="VO Project" ID="{c2a7fdd0-7a55-40ec-85fc-e5e4de4171d4}" SourceID="{910f1ba0-847d-4238-8de0-fc0cb19047c4}" StaticName="DocumentNumber" Name="DocumentNumber">
</Field>
this is a example of a sitefield
- omkar kuchekarMay 19, 2017Copper ContributorYes 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 kuchekarMay 19, 2017Copper ContributorYes 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 kuchekarMay 19, 2017Copper ContributorFor adding existing content type
<pnp:ContentTypeBindings>
<pnp:ContentTypeBinding ContentTypeID="0x0101" />
</pnp:ContentTypeBindings>