Home

How to set the default value for a SharePoint page layout field when using Design Manager snippets?

Highlighted
Occasional Contributor

I have a business requirement to set a default value for a field within a SharePoint page layout. When attempting to enter a value in ListItemFieldValue within the snippet customization I encounter the error Cannot create an object of type 'System.Object' from its string representation '#myValue#' for the 'ListItemFieldValue' property.

 

I've tried using ItemFieldValue, ListItemFieldValue, and Value with the same results.  I came across an article that shows how to manually code in a value for a rich text field, https://sharepoint.stackexchange.com/questions/173555/pre-populate-html-content-in-the-page-content-..., but cannot find any similar information for other field types.

 

I am specifically trying to set the default value for a managed metadata column. I am encountering the error for other field types, such as a number column.

 

Related Conversations
We've updated you to the latest build page design
U2men in Discussions on
2 Replies
Working with excel in Sharepoint desktop app
IanH1 in SharePoint on
2 Replies
Can you Please turn THIS into THIS?
HotCakeX in Discussions on
18 Replies
New Feature in Edge Canary: new dark design for Tab strip
HotCakeX in Discussions on
50 Replies