There is a code that examples type of my problem:
function testing(){
let ss = SpreadsheetApp.create("Test Table");
ss.addEditor("[email protected]");
ScriptApp.newTrigger('button')
.forSpreadsheet(ss)
.onOpen()
.create();
}
function button(){
SpreadsheetApp.getUi()
.createMenu("Scripts Menu")
.addItem('Hello!', 'hello')
.addToUi();
}
function hello(){
SpreadsheetApp.getUi().alert("Hello World!");
}
In that code, that runs in google app script bounded to a SpreadSheet, I create a SpreadSheet, give an editor rights to another user, then set an installed onOpen trigger that creates Menu that fire Hello script. I want that when this editor click on the menu item hello in that spreadsheet he will see Hello! message. But that's not happen. Instead it just loading a script without ending. But when I run it under my account it works just fine. Could anybody point to me where is the mistake, or maybe i am just missleaded in something, and how i can fix it?