javascript - Validate field/attribute in CRM Dynamics forms using js -
i have problem in validating attribute on form in crm dynamics. added javascript code validate attribute value based on business rules. , added 2 events, form on save , field on change,
the question is:
1- best way validate on attribute?
2- in case of using way, how can stop saving form or passing valid ?
i believe that's way validate input. in case want stop save in case 1 of validations fails following:
- check "pass execution context" during registration of save event handler.
- add parameter function that's called during save procedure.
in case validation fails call following code:
execobj.geteventargs().preventdefault()
you can find more details here -https://msdn.microsoft.com/en-us/library/gg509060.aspx
Comments
Post a Comment