You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to create a custom List Template in my Tenant with the use of Add-PnPSiteScript and Add-PnPListDesign but the list content types do not get created or inherited correctly.
The name of my custom content type does not get reflected in the list and i have 2 content types of type Item. In the background both list content types seem to have the correct IDs and the parent association is also working. So it seems the Display name is some kind corrupt. As I also use "German" as UI language, the behavior is similar, in this case i get 2 content types: Item and Element (which is the german word for item). When i try to deploy just my content type without the Item content type I get an acceptable solution, but when I activate Content Types in the list, the name is again wrong= Item.
Steps to reproduce
In an first step I extract the List definition from an Site Collection with the command Get-PnPSiteScriptFromList. This is working without any problems.
In the next step I integrate the generated code from the last step without any modifications in my script and deploy it to my tenant without any errors. See code attached as script.
I try to create a custom List Template in my Tenant with the use of Add-PnPSiteScript and Add-PnPListDesign but the list content types do not get created or inherited correctly.
The name of my custom content type does not get reflected in the list and i have 2 content types of type Item. In the background both list content types seem to have the correct IDs and the parent association is also working. So it seems the Display name is some kind corrupt. As I also use "German" as UI language, the behavior is similar, in this case i get 2 content types: Item and Element (which is the german word for item). When i try to deploy just my content type without the Item content type I get an acceptable solution, but when I activate Content Types in the list, the name is again wrong= Item.
Steps to reproduce
PnP-Deployment-Script-ListDesign.txt
Please provide any guidance how to get the correct names in list content types.
Further findings:
Documentation of Site Templates and Site Scripts not up to date
addContentType requires ID parameter when deploying otherwise the List template is not working properly
removeContentType is not working when I add a custom content type and want to remove the Item Content Type
Custom Column formatting with replace function cannot be deployed and results in error
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "a", "txtContent": "@currentField", "attributes": { "href": "=replace([$FileRef], '/'+[$FileLeafRef],'/') + 'DispForm.aspx?ID=' + [$ID] + '&Source=' + replace([$FileRef], '/'+[$FileLeafRef],'')", "target": "_blank" } }
The text was updated successfully, but these errors were encountered: