2

Customer has a requirement to set the value to Address field programmatically based on some business logic and then set it to read only. We noticed that the Script to set values & making them read only works for all the field but Address. It has been observed that when we save the record (once it is loaded) from UI, the values gets updated to the address filed and also makes it read-only . However when we put the "Xrm.Page.data.entity.save();" to save the entity programmatically, it does not work as expected i.e. the field still doesn't load the expected value.

Saving record from UI will not work as it requires user to click on the save button every time they open a form record.

Also I try to give some timeout using "window.setTimeout" between setting the value and making it read-only but this also did not help.

** Script attached

Category: General
STATUS DETAILS
Declined
Ideas Administrator

Thank you for submitting your idea to our ideas portal. We appreciate your contribution and the time you took to share it with us. We have shipped many enhancements since this idea was posted and it is likely that it has been resolved. If not, kindly reopen. Thank you again for your continued support.

Comments

R

Currently this is not in our immediate roadmap, however, we are tracking it and if we indeed get more feedback and votes, we may consider it in future. In order for the values that you have set through Client API to reflect on the form, you need to save the form. This can be accomplished using client api: Xrm.Page.data.entity.save( null | "saveandclose" |"saveandnew" ) More information here: http://msdn.microsoft.com/en-us/library/gg334720.aspx#BKMK_save Regards, Karan

Category: General