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:

  1. check "pass execution context" during registration of save event handler.
  2. add parameter function that's called during save procedure.
  3. 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

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -