Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

How to load JavaScript used in JS function called from the Ribbon ?

$
0
0

Hello,

I have a requirement for my company : Hide the "Export to Excel Online" button based on the Security role for the Ribbon : Mscrm.Homepage.Grid.list.MainTab.
I know that I can't manage this directly via the RibbonWorkbench.

So I decided to go for a custom function which return a true or false if the user has the specific role.

So far, no problem.
But in my custom function I use the js library : XrmServiceToolkit.

So when I debug my function, I get a nice : "XrmServiceToolkit is not defined". In a certain way it makes sense, since on this view, I can't force the loading of JS files like we can do on a form.

I found this article : https://rajeevpentyala.com/2012/05/23/loading-dependent-jscript-libraries-in-ribbon-buttons-execution-crm-2011/ but it is the same result for me.

If anyone has a solution.

Thanks a lot,

Clément 


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>