Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Capturing 'Read Only' Error for JavaScript Save Event

$
0
0

Hi,

I have a button on a form that when clicked will call the Xrm.Page.data.entity.save(); command followed by other code.

Somehow I have users that are finding themselves in a situation whereby they have the same record open twice, they close the record in one instance and then try to update it in another instance.  Of course, when they try to update a record that has already been closed, CRM presents them with the following error.

Error

The object cannot be updated because it is read-only.

I have tried using a 'Try' and 'Catch' to allow for the error and simply refresh the page if the record is closed but it is not working - the error is still being shown to users.

Is there another way that I can catch this error and stop my users seeing the standard CRM error message?

Many thanks

Rob


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>