← Problems

Edit scripts fail with undefined event errors

Simple onEdit scripts fail with undefined event-object errors when run from the editor or on a trigger.

Tier II · Emerging Problems that are still building up.

4 public reports · first reported 6 August 2021 · last reported 29 May 2024

Idea report · $9 · No contacts · All sales final

See a sample idea report

What's going wrong

Beginners who write a simple onEdit function and press Run in the script editor get errors saying the event object or range is undefined.

AI-assisted: written with the help of AI from the reports. The idea report has the full summary.

In the idea report

  • The full summary.
  • The products the 4 reports are about, and how many came each month.
  • Related problems.

No business has been found with this problem yet, so the report has no contacts. All sales are final — no refunds. Pricing.