简体   繁体   中英

Alert isn't working in Google Apps Script

I am trying to use an alert in my scripts but nothing is happening and I'm not sure why. I've using the exact code found in the Google Documentation but must be missing something. Any idea why I don't see the alert with the code below?

 function alertTest() { SpreadsheetApp.getUi().alert('Working?'); } 

The code is correct, so the function may not be getting triggered. Add a Logger.log('test ran!'); statement, and VIEW the LOG to see if anything printed to the LOG. If nothing printed to the LOG, then the function never got triggered. If there is an error that is killing your code, it should show up in the VIEW, EXECUTION TRANSCRIPT log.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM