Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

context.getEventArgs().preventDefault() Not working for Service Appointments in CRM 2013

$
0
0
So I have this function:

var stopSave=function(context) {   
 if (!checkCustomersOk()){        context.getEventArgs().preventDefault(); //Stops the Save Event    }
}


In theory this should prevent the form from being saved and it works fine for updated entities as well as for several non updated entities that I have tried. It's registered on the onSave event and the context is passed as the first parameter

It does not work for service appointments though.

There are no errors, it just runs through it and then saves it as if nothing has happened.

Same behaviour from IE 11 and Chrome 34

Any ideas?

TIA

Viewing all articles
Browse latest Browse all 8223

Trending Articles



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