I am using status reason field on Incident entity. There is a function written on change of the field value.
if (statusValue == 2)
{
Xrm.Utility.alertDialog("Cannot set this value", function () {
// Change the status to previous value
Xrm.Page.getAttribute(constants.statuscode).setValue(1);
});
The function triggers thrice when we set the value of the field. The function triggers once when we don't reset the old value.
Can anyone provide a workaround for it or reason why it is happening?
*This post is locked for comments