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)

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

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