2 deleted 7 characters in body
source | link

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

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

and content type

<pnp:ContentTypes>
 <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?

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

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

and content type

<pnp:ContentTypes>
 <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?

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

  <pnp:SiteFields>
<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:ContentTypes>
 <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?

1
source | link

Provision a list with attached content type and site columns

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

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

and content type

<pnp:ContentTypes>
 <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?