Script is authorized, but events throw authorization error

730 views
Skip to first unread message

Ron Meske

unread,
Jun 28, 2022, 2:50:06 PM6/28/22
to Google Apps Script Community
Hello All,

I have a Sheet that has an attached Script.  The sheet contains various lists that are used to populate drop-downs in a Form.  Running the script from the editor the Form is updated based on the lists in the Sheet. 

I added an onEdit event so that when a list is updated the appropriate drop-down will be updated from the list.  When I open the Sheet and make an edit I receive the following error "You do not have permission to call FormApp.openById".

I did check that permissions in my account and verified that it is listed.  I also added the necessary to the manifest for the script.

Any ideas on why there is still a permissions error and how to correct it?

Jonathan Butler

unread,
Jun 28, 2022, 4:14:04 PM6/28/22
to google-apps-sc...@googlegroups.com
Most likely you are using the onEdit simple trigger instead of the onEdit installed trigger. If that is the case, the solution is to go to your triggers -> Add Trigger then select From Spreadsheet for event source  and on edit from event type. Make sure you change the function called onEdit() to something else of your choosing. Then, select that function.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/f735cc8a-1996-4922-820d-5991a936d90an%40googlegroups.com.

Ron Meske

unread,
Jun 30, 2022, 12:45:19 PM6/30/22
to Google Apps Script Community
You are correct, I was using the simple trigger.  Once I made the change to the installed trigger version it worked without error.  

Thank you for pointing that out!
Reply all
Reply to author
Forward
0 new messages