I've been struggling for a few days now trying to get a script to work. At its most basic level my function contains this:
function onEdit(e) {
var changedRange = e.source.getActiveRange()
}
It seems this is a perfectly legitimate use according to Google's docs: https://developers.google.com/apps-script/guides/triggers/events
This code however produces this error:
TypeError: Cannot read property "source" from undefined. (line 18, file "Code")
I've added a trigger for onEdit as well but this still does not work in the script. Am I missing something?