[英]Installable onEdit trigger firing twice Google Apps Script
My question is simple.我的问题很简单。 If I have a function named 'onEdit' in a Google Apps Script that I have set up as an installable trigger, will it fire twice?
如果我在 Google Apps 脚本中有一个名为“onEdit”的函数并设置为可安装触发器,它会触发两次吗? As in once for simple trigger behaviour and once for installable trigger behaviour?
一次是简单的触发行为,一次是可安装的触发行为?
如果您有一个简单的触发器和一个可安装的 onEdit 触发器设置,那么是的,您将获得两个触发器事件。
I know that this question has been answered but what worked for me was not naming my method "onEdit" because it will automatically run when editing any cell of the sheet.我知道这个问题已得到解答,但对我有用的不是将我的方法命名为“onEdit”,因为它会在编辑工作表的任何单元格时自动运行。 You just have to install onEdit as a trigger if it requires something with another authorization scope.
如果 onEdit 需要具有其他授权范围的内容,您只需将其安装为触发器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.