I have an Apps Script with onEdit(e)
function. That function calls some other functions depending on existing and new data. In certain cases, showModalDialog
needs to be shown. If I enable function onEdit(e)
via trigger onEdit, it launches some function twice (like inserting rows and performing calculations). If I delete that trigger from a trigger list, then showModalDialog
cannot be shown and error You do not have permission to call showModalDialog at showDialog(Code:82) at onEdit(Code:1270)
The idea is to make showModalDialog
to appear when required and start all other function only once when a user edits data.
I would really appreciate if you help me with a solution.