I have Sharepoint App which is doing some ribbon customization. Basically, its adding a button within a ribbon. while i can add button successfully, its not invoking my function.
Following is snippet of my Ribbon XML:
<CommandUIHandler Command="ShowHelloWorldCommand" EnabledScript="return true;" CommandAction="test()" />
public test= () =>
alert('Hello!');
When ever i click on Ribbon button. it says test is not defined. unfortunately i can not move this function outside on page using content editor or script editor as my test function contains code from Graph Client.
is there a way to invoke function from ribbon ?