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.