Reputation: 4520
I can't seem to find how to add simple validations to a form. I have never done that before. I've googled a loot but can't find anything.
On the Lead entity, I have to fields. Users shouldn't fill only one. They have to fill both or none.
1- Where can I add the validation code? Seems like in CRM 4 it happened in the form editing, in the field properties -> Events tab. But from there, there is no place to add any code.
Any help and pointer is highly appreciated
Upvotes: 1
Views: 850
Reputation: 2848
In CRM 2011 JavaScript code now goes into Web Resource files. You define your methods and then for validation purposes you can use the OnChange event for a field or the OnSave event for a form to call the validation function. When defining the event you would select the JavaScript resource file and then enter the method name you want to call when the event fires.
Upvotes: 4