Sitemap

Saturday, June 21, 2014

Use JavaScript in Dynamics CRM to Set the Value in Read-Only Field on a Form

By default CRM will not allow you save the data assigned to readonly field. For that we have use below javascript code snippet to make this work.

For ex new_amount is the readonly field in your form. So to save the data assigned to it use the below code snippet

function SetSubmitForAmountField()
{
Xrm.Page.getAttribute("new_amount").setSubmitMode("always");
}


You have to call this function on onsave of your form as shown below.

No comments:

Post a Comment