web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

what javascript , prevalidate, pre operations and post operations tasks can be done ?

(0) ShareShare
ReportReport
Posted on by 267

Hi i am just learning dynamics and doing practice at different things in different area specifailly in customization at this time.

i am working in Contact so i am trying things for javascript , prevalidate, pre operations and post operations ....

can any one please suggest me few different tasks for above mentioned area like   javascript , prevalidate, pre operations and post operations  like what i can do to practice please?

i hope i have cleared my question to you guys...

thanks in advance

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    Let’s take Contact creation scenario & assume you have date of birth field which has to be validated for 18 years of age, if so mark “yes” in another bool field ie. age verified.

    JavaScript - do a form field onchange validation to calculate the date difference between today & DoB field value & throw alert.

    Pre validate - if for some reason the above js validation fails, revalidate the same above logic in plugin.

    Pre operation - if this stage is reached then set the age verified field (bool field) in target entity itself.

    Post operation - send an email to contact as registered successfully.

    Read this: community.dynamics.com/.../216706

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Zaub,

    If my understanding is correct you  want to know in which scenario you can  use  javascript , prevalidate, pre operations and post operations.  

    Javascript can run only client side , let say you before save contact you want to validate forms in the client side. You can also call JavaScript function on form load as well. Using Javascript you can retrieve data using web API , ODATA and validate, populate any kind of data . There is a limitation that Javascript will work only CRM UI interaction. Let say you are creating one record from API , so javascript validation will not fire. Thats why plugin came into picture to do operation in server side.

    So when you doing create , update , retrieve , delete or any operation in CRM system using SDK call its  passes through dynamics CRM event execution pipeline . Dynamics CRM  event processing subsystem executes plug-ins based on a message pipeline execution model. The event pipeline is divided into multiple stages called prevalidate, pre operations ,platform core operations and  post operations .

    For more details you can go through bellow reference -

    docs.microsoft.com/.../event-execution-pipeline

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans