0

I am using a custom list template in SharePoint Server (2019). How can I add a custom property (with a default/fixed value) in the manifest.xml file that will be available for all the lists that are created from this template using SharePoints api? For example, I would like to do something like this:

/_api/lists/GetByTitle('MyLibrary')/rootfolder/properties?$select=MyCustomProperty

Or is there another way to find out which template was used to create my lists?

1 Answer 1

0

See: How to determine the List Template (SPListTemplate) that was used to create a list?

And: https://www.enjoysharepoint.com/sharepoint-list-templates/

Use Sharepoint Online Management Shell:

$extracted = Get-SPOSiteScriptFromList -ListUrl "https://yoursite.sharepoint.com/sites/strategy/customer-contacts"

Add-SPOSiteScript -Title "Customer Tracker" -Description "This creates a customer contact list" -Content $extracted

Add-SPOListDesign -Title "Customer tracking" -Description "Tracks key customer data in a list" -SiteScripts "<ID from previous step>" -ListColor Orange -ListIcon BullseyeTarget -Thumbnail "https://yoursite.sharepoint.com/SiteAssets/site-thumbnail.png"

List templates can’t be updated after you add them, you need to remove the existing template and add the updated version.

Use the SPList.RootFolder.Properties["vti_listservertemplate"] property to find out which template was used to create a list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.