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 site column and not giving any error too.
<pnp:SiteFields>
<Field ID="{793F0419-9A72-48D9-B983-91BD359E5387}" Name="MyCustomPNPField" StaticName="MyCustomPNPField" DisplayName="My Custom PNP Field" Type="Note" Required="FALSE" RichText="FALSE" Group="My Custom PNP Fields" />
</pnp:SiteFields>
- 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>
12 Replies
- Deleted
how 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 kuchekarCopper 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 kuchekarCopper 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>