Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

google apps script - We're sorry, a server error occurred while reading from storage. Error code NOT_FOUND

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...