There is no supported method in SDK to get and set form header field value using JavaScript. However, there is a workaround to achieve this just place field in Form Header and Form as well (You can hide field from Form in case of you don’t want to show the user). Then you can get and set the field values.
// to get field value
var Value=Xrm.Page.data.entity.attributes.get("new_field").getValue();
// to set field valuenew_field
Xrm.Page.data.entity.attributes.get("new_field").setValue(100);
No comments:
Post a Comment