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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Call a JavaScript function in another JavaScript library

(0) ShareShare
ReportReport
Posted on by

Is there a way to call a MS system JavaScript function from within a custom JavaScript library in CRM 2016? For example, on a quote, I am customizing the Activate Quote button to set a flag on the quote before closing the quote. I am able to get the button to launch the custom JavaScript to set the flag, but I am having trouble getting the system ActivateQuote function to fire afterwards. I tried adding a second action on the ribbon command, but it didn't fire. Now I am trying to call the ActivateQuote function in /_static/SFA/quotes/quote.js. Does anyone know how I can do that?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    JohnAnonymous Profile Picture
    5,241 on at

    I've done the same thing with promoting a lead. I changed the action to my custom JavaScript function and then added the default call to the JavaScript method in my own function.

    The way JavaScript works is that you can just call the function if the JavaScript library is loaded, as the functions are all added to the global dom. The only thing that might be an issue, is that with Turbo forms your resource won't be loaded. But that's something you have to test.

    It is not supported, but in my case it works without error and I'm using an onpremises environment where I have control over CRM updates.

    I just have this line of code in my JavaScript function:

    Mscrm.LeadCommandActions.qualifyLeadQuick();


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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Ciprian  P Profile Picture

Ciprian P 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans