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);
Hel&X6c;o, I log on to yο&X75;r blog on а regular basis.
ReplyDeleteYour hu&X6D;oristiс style is aωeso&X6d;e, keep &X75;p the good worκ!
Tak&X65; a look at my b&X6c;og... bb ()
Hi,
ReplyDeleteWe have added JavaScript where we need to hide Header Status Reason field on Case form through Javascript.
We have used below code
var statusReason_header = Xrm.Page.getControl("header_statuscode");
The above code is returning null reference in Interactive service hub. However the above piece of code is working in web client. We have placed Status Reason field on Case form Header.
Thanks