Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpreadsheetApp.getUi() cannot be called from this context #50

Open
dan-mesa opened this issue Jun 23, 2019 · 0 comments
Open

SpreadsheetApp.getUi() cannot be called from this context #50

dan-mesa opened this issue Jun 23, 2019 · 0 comments

Comments

@dan-mesa
Copy link

When creating a trigger, the onOpen function runs the createMenu function which throws the error in the issue title, and the scheduled trigger fails. I worked around that by creating an onTrigger function:

function onTrigger() {
  getData();
  getGlobal();
}

and executing that instead of onOpen strictly within the trigger. Everything else worked well, much better than the scraping that I had in place prior to finding this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant