Hey guys,
this is a pretty specific question.
Javascript A:
function onclick() { test(); }
Javascript B:
function test() { alert ('works'); }
I have custom Ribbon Button Test which is configured to call onclick() inside of Javascript A.
I also added Javascript B as a dependecy of Javascript A.
But somehow, if I click on my button, I can't access the test() function.
Crash Report:
CrashReport: FileName:/tools/Solution/home_solution.aspx LineNumber:0 Function:signIn ErrorReport: 1.0 XMLHandler {4edd0170-86c6-4bdd-9a85-7a5575ba0248} test is not defined 0 0 /tools/Solution/home_solution.aspx?etc=7100&sitemappath=Settings|Customizations|nav_solution&pagemode=iframe /tools/Solution/home_solution.aspx?etc=7100&sitemappath=Settings|Customizations|nav_solution&pagemode=iframe signIn $webresource:cr8e3_authJS ReferenceError: test is not defined at signIn (:3:1) at Function.Mscrm.Utilities.executeJavascriptFunction (https://crm4.dynamics.com/_common/global.ashx?ver=-330508:6872:600137) at Mscrm.CommandHandler.$Cu_1 (https://crm4.dynamics.com/_static/_controls/ribbon/ribbon.js?ver=-330508:1:82816) at Mscrm.CommandHandler.$Ap_1 (https://crm4.dynamics.com/_static/_controls/ribbon/ribbon.js?ver=-330508:1:82156) at Mscrm.CommandHandler.handleCommand (https://crm4.dynamics.com/_static/_controls/ribbon/ribbon.js?ver=-330508:1:77067) at Mscrm.CommandBarData.executeCommand (https:/crm4.dynamics.com/_static/_controls/ribbon/ribbon.js?ver=-330508:1:146512) at Mscrm.ButtonControl.executeCommand (https://crm4.dynamics.com/_static/_controls/ribbon/ribbon.js?ver=-330508:1:60031) at Mscrm.ButtonControl.click (https://crm4.dynamics.com/_static/_controls/ribbon/ribbon.js?ver=-330508:1:56116) at Mscrm.CommandBar.onClickHandler (https://crm4.dynamics.com/_static/_controls/ribbon/ribbon.js?ver=-330508:1:22257) at HTMLAnchorElement.cd (https://r1.res.office365.com/o365/versionless/shellcoreming2am_35b8ea41.js:58:18)