
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)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();