Thursday, June 9, 2011

Setting Attribute from javascript


Xrm.Page.getControl("neu_yearstart").setDisabled(false);
Xrm.Page.getAttribute("neu_yearstart").setValue(FiscalYearStart);
Xrm.Page.getAttribute("neu_yearstart").setSubmitMode("always");
Xrm.Page.getControl("neu_yearstart").setDisabled(true);


setSubmitMode as always will save the values to the database . if this value is not set then the value is not saved to the database but it will be visible in the front end

for example on change of one field you are setting other field then on the UI you can see the value as changed but when the user hits the save button the value is not saved to the database.


No comments:

Post a Comment