I have a custom content type defined in the contenthub, with attached custom site columns. I want to provision a list (via site script and site design). But with the solution I have, the content type only publishes on site level, but doesn't get attached to a list. In my site script I define a list, and in the site design I provision the content types and fields/columns.

In my site design I have defined

<Field ID="{5b34f3e5-fa67-4c94-a041-ed56969ff003}" Type="DateTime" Name="ProjectEndDate" StaticName="ProjectEndDate" DisplayName="End Date" Group="Project Columns"  Format="DateOnly"> </Field>

and content type

 <pnp:ContentType ID="0x010035BBA270D8088842B5FBD5812A8A36CE" Name="Private" Description="Private Projects" Group="Project"> </pnp:ContentTypes>

In my site script I have:

 "verb": "createSPList",
        "listName": "Information",
        "templateType": 100,
        "subactions": [
                "verb": "SetDescription",
                "description": "information"

This will create a list with default columns, but without the custom content type and the custom site column.

In other words, I somehow need to attach the content types and the site colum to the list defined in the site script. I have tried (in the script) to add "addContentType" and "addSiteColumn" as sunactions but it couldnt find the types or the columns. Any help?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.