I am getting this error when running :TypeError: Cannot read property 'range' of undefined at onformsubmit(Code:10:17)
I have installed the onformsubmit
trigger but it is not working. What is not working here?
function onformsubmit(e) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var range = e.range;
var row = range.getRow();
var sheet = range.getSheet();
sheet.getRange(row, 17).setFormula("=if($O"+row+"=\"UZS\",index(googlefinance(\"currency:UZSUSD\",\"price\",$B"+row+"),2,2)*$P"+row+",if($O"+row+"=\"EUR\",index(googlefinance(\"currency:EURUSD\",\"price\",$B"+row+"),2,2)*$P"+row+",$P"+row+"))");
}