Reputation: 51
I am not writing a code with the Google FormApp, as we all know, every Form has a Destination Sheet,I want to open the SpreadsheetApp by :
var destId = FormApp.getActiveForm().getDestinationId();
var ss = SpreadsheetApp.openById(destId);
But I've got an warning that "you don't have the permission openById",that means I can't open the Spreadsheet in the FormApp's script?
Or is there anything wrong with my code?
P.s. I am writing code based on "form notifications by google".
Thanks!
Upvotes: 0
Views: 384
Reputation: 51
delete the code @OnlyCurrentDoc
/**
* @OnlyCurrentDoc
*
* The above comment directs Apps Script to limit the scope of file
* access for this add-on. It specifies that this add-on will only
* attempt to read or modify the files in which the add-on is used,
* and not all of the user's files. The authorization request message
* presented to users will reflect this limited scope.
*/
Upvotes: 2