Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Javascript not working when action is done quickly

Posted on by Microsoft Employee

Hi all, 

I have a simple OnChange javascript function linked to a country field, which changes another field whenever the country field is updated. 

But, when I change the country field and save quickly, the other field is not updating (Meaning the javascript is not running/loading). 

The below picture for more clarification of what the javascript does. It is crucial that the javascript always runs and the field is always updated.

2570.Untitled_2D00_2.jpg

Can I somehow ensure that the javascript always runs onChange?

Thanks

*This post is locked for comments

  • Kevin Grech Profile Picture
    Kevin Grech 380 on at
    RE: Javascript not working when action is done quickly

    Have you considered using a synchronous (real-time) workflow instead of javascript?

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Javascript not working when action is done quickly

    I don't think there is any way we can delay window load. You can use plugin to achieve it

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Javascript not working when action is done quickly

    Is there any way to delay window loading until the onChange script is loaded?

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Javascript not working when action is done quickly

    Please make sure you use the same script on save event

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans