Attempting to run the code below as a Script in Google Sheets. The goal is to be able to use the onEdit Trigger
Unfortunately, the code below is giving a:
TypeError: Cannot read property 'range' of undefined
onEdit @ Code.gs:4
Error
function onEdit( e )
{
var datass = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("FXKLog")
var sh=e.range.getSheet();
var range = e.getRange();
}
What is the problem?
Any help, hints or advice would be greatly appreciated.
TIA