Reputation: 21
I have a number of forms that have all been working fine for several months (and years in a few cases). We're a small school district and I am the only tech. I built the forms so that teachers can request equipment, ask for help, or ask general questions. The form is embedded in a google site shared with staff members. Once they submit, an apps script in each spreadsheet collects the form data and emails it to me, so that I do not necessarily have to look it up in the spreadsheet. This has all worked fine for a long time. Beginning in the last few days I have been getting error messages (example below), and it appears my onformsubmit triggers have all been lost.
function onMyFormSubmit(e) {
var myEmailAddress = "[email protected]" ;
var myEmailSubject = "Ask The Tech" ;
var replyToAddress = String(e.namedValues['Username']);
try{
var message = e.values.join( "][" );
var hmessage = "<b>From: </b>" + replyToAddress + "<br>";
hmessage += "<b>Question: </b>" + e.namedValues['Your Question'] + "<br>";
hmessage += "<b>When: </b>" + e.namedValues['Timestamp'] + "<br>";
var advancedArgs = {htmlBody:hmessage,replyTo:replyToAddress};
MailApp.sendEmail(myEmailAddress, myEmailSubject, message, advancedArgs) ;
}
catch(err){
MailApp.sendEmail(myEmailAddress, myEmailSubject, err) ;
}
}
Start Function Error Message Trigger End
2/1/13 2:30 PM onMyFormSubmit You do not have permission to call getActiveSpreadsheet formSubmit 2/1/13 2:30 PM
As you can see from the example script, none of the scripts directly call getActiveSpreadSheet, so I don't understand why I am getting this message. Additionally, once I looked at the script, and realized the triggers were gone, when I added a new trigger, the script started working again onformsubmit, however I STILL get the error messages delivered to my mailbox, as well as the script-generated email.
Is this issue related to the recent forms revamp, something deficient in my code, or is there anything I can do about it? If it's a google bug, is there an issue tracker I should submit my problem to? Thanks in advance for any responses!
Upvotes: 2
Views: 1597
Reputation: 45720
Issue 2391: Since Forms Refresh Update On-Submit Error was reported fixed Feb 25, 2013.
Upvotes: 1