2

I have installed an Edit Trigger in a bound Apps Script Project, and the trigger is not firing when the document is edited. It will firing using a 'Simple Trigger' but because I'm using methods which require authorization, I need to stick with an Installed Trigger. Any ideas why it might not be working?

function createSpreadsheetTrigger() {
   var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
   var onEditTrigger = ScriptApp.newTrigger('Edit_Made')
      .forSpreadsheet(spreadsheet)
      .onEdit()
      .create();
}

function Edit_Made(e){
    Logger.log('ARGHHH!!');
    var source = e.range;
    var sRow = source.getRow();
    var sCol = source.getColumn();
    var sSheet = source.getSheet().getSheetName();
    var val = source.getValue();

    if(sCol == 3){update_row(val ,sSheet,sRow,source);}
    else if(sCol ==12 || sCol==13){client_edit(val,sSheet,sRow,sCol,source);}
 }

The actions performed in the update_row and client_edit functions are irrelevant especially considering the 'ARGHHH!!' is never logged.

1 Answers1

1

Thanks for the response. It turns out that the problem was the Trigger service was having problems yesterday. Once it came back up, everything started working again.

  • Anyone know if the Trigger service is down again? I'm having the exact same issue on two separate scripts/sheets. @Nathan how did you verify this? – Y Davis Sep 21 '18 at 02:52
  • I did find this link: https://developers.google.com/apps-script/guides/support/outage-log – HardScale Jul 08 '20 at 21:58