Saturday, February 11, 2012

MSCRM 2011 javascript validate lead qulify javascript

Sometimes validation of fields is needed before qualifying a lead.
Setting the fields to be required isn't good enough, because there is no need to require the fields for every save.
It can be done using javascript on form save event.

Check if the save mode equals 16 (lead qualify) by using


Use prevent default to prevent the page from saving and qualifying.

Microsoft link about preventDefault

Microsoft link about getsavemode

Good wiki that extends more about getsavemode and preventDefault

1 comment: