I'm facing this issue while I'm running the script. one day before if was working fine for me. I did clear all the cache of chrome browser and I tried another laptop also but the issue is as it is. please help me to resolve the issue.
The code I'm running is:
function onOpen(e) {
var menu = SpreadsheetApp.getUi().createMenu('Reporting Tools');
menu.addItem('Create Unit Scorecards', 'HSIPScorecard2021CountryScripts.createInputSheets');
menu.addItem('Notify Unit H&S Heads', 'HSIPScorecard2021CountryScripts.sendNotifications');
menu.addItem('Consolidate Unit Data', 'HSIPScorecard2021CountryScripts.Consolidate');
menu.addToUi();
}
I just ran into the same problem last week. After wasting a few day's time, I found it was caused by a reference to a library using development mode. Change it to a deployment version solved that.
Assuming that the name of the library is correct you can write that like this:
function onOpen(e) {
SpreadsheetApp.getUi().createMenu('Reporting Tools')
.addItem('Create Unit Scorecards', 'HSIPScorecard2021CountryScripts.createInputSheets');
.addItem('Notify Unit H&S Heads', 'HSIPScorecard2021CountryScripts.sendNotifications');
.addItem('Consolidate Unit Data', 'HSIPScorecard2021CountryScripts.Consolidate');
.addToUi();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With