Hi,
I have the JS below which i've enabled on fields of a form to autosave when the field is dirty (unsaved changes). Can someone please help me add a condition to indicate "if field value = WTVR or != WTVR". If you could give me the complete JS as a whole, i would appreciate it. What i would like to accomplish is to AutoSave only if the field contains, or does not contain, a specific value, or null. Lets assume the field i'd like to check is called "Holding" and the filed value is "Walked". If Holding Value = Walked then dont AutoSave.
Also, I have a business rule to show an error msg on a field based on a condition. When i try to use this AutoSave on that form it doesn't work, ever after the error condition is cleared. It sounds like the JS is running prior to the error being cleared? What i see happening is that when i clear the error msg condition (condition in the business rule), i see the error msg next to the Save icon which is of course the AutoSave trying to save, but at this time, i can of course Save the form manually because the error msg is gone.
function SaveForm() {
if (Xrm.Page.data.entity.getIsDirty()) {
Xrm.Page.data.save();
}
}
*This post is locked for comments
I have the same question (0)