I am working on a javascript function to provide duplicate detection. I want to prompt the user that there may be a duplicate and provide the option to cancel saving/creating the form. I am encountering a problem canceling the save event. I am attempting to use the execObj.getEventArgs().preventDefault() function but I can't seem to get the execution object to be anything other then null even though I have checked the box to pass the execution context as the first parameter. Here is what I have so far:
_onSave: function (executionContext) {
Xrm.Utility.confirmDialog("A similar record in case# 6572-2 has been detected. Are you sure you want to create this case?", null,
function (executionContext)
{
executionContext.getEventArgs().preventDefault();
})
}
*This post is locked for comments
I have the same question (0)