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 (Archive)
Suggested answer

Javascript OnChange Event After Synchronous Plugin Update

(0) ShareShare
ReportReport
Posted on by 240

Hello,

I have an question regarding the Javascript onChange Event in Forms for CRM Online.

In a particular scenario, I update a single value in FieldA.

This triggers a Synchronous Plugin, which in turn updates the value of Field B and Field C on the entity.

Fields B and C have OnChange Event handlers defined against them.

These updates leave the record in the correct state.

I believe this code may have initially come from CRM 2013, when the entire form would reloaded post save.

In CRM Online, when the form refreshes. The OnChange() event is now being triggered against Field B and Field C as the data has changed on the server.

This is causing issues as the plugin has perfomed the correct updates. I do not want the OnChange event to fire in this scenario.

So, the more general question is this:

Is there anyway to determine if an onChange event has been triggered due to an actual user interaction with the User Interface, rather than by a field refresh post save?

  • Marco.P Profile Picture
    2,405 on at
    RE: Javascript OnChange Event After Synchronous Plugin Update

    Hi @Shaun Harvey,

    Any news? How'd you decide to proceed?

  • Suggested answer
    Marco.P Profile Picture
    2,405 on at
    RE: Javascript OnChange Event After Synchronous Plugin Update

    Hi,

    I don't think you can get such informations (but hey other memebers, please prove me wrong!). If i were you, i would make my plugin running on behalf of a particular user (example: It_Adm_user) and then on js function check the modified by field to prevent the body function to execute.

    Hope it helps!


    If you found the answer helpful for you or other readers, please mark as Verified.

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

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard > 🔒Ι Microsoft Dynamics CRM (Archived)

Featured topics

Product updates

Dynamics 365 release plans