Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script Google Apps脚本-驱动器权限插入-随机错误:无法共享以下项目_Google Apps Script - Fatal编程技术网

Google apps script Google Apps脚本-驱动器权限插入-随机错误:无法共享以下项目

Google apps script Google Apps脚本-驱动器权限插入-随机错误:无法共享以下项目,google-apps-script,Google Apps Script,下面是我的谷歌应用程序脚本代码的摘录 var edit = []; ... if (edit.length > 0) { for (var ed=0; ed<edit.length; ed++) { try { Drive.Permissions.insert( {'role': 'writer', 'type': 'user', 'value': ''+edit[ed]+'' }, file.ge

下面是我的谷歌应用程序脚本代码的摘录

var edit = [];
...

if (edit.length > 0) {
  for (var ed=0; ed<edit.length; ed++) {
    try {
      Drive.Permissions.insert(
      {'role': 'writer',
      'type': 'user',
      'value': ''+edit[ed]+''
      },
      file.getId(),
      {
      'sendNotificationEmails': 'false'
      });
    } catch (ePerm) {  
    MailApp.sendEmail(courrielcreator, "Subject error","\rBody error);
    }               
  }
}
var edit=[];
...
如果(edit.length>0){

对于(var ed=0;ed这些线程中给出的建议解决方法是创建电子表格的新副本,然后再次共享。如果没有帮助,请尝试注销并清除缓存/cookies。

这些线程中给出的建议解决方法是创建电子表格的新副本,然后再次共享。如果没有帮助,请尝试签名ut和清除缓存/cookies。

你好,abielita,谢谢你的评论。另一方面,我不能应用这些规定。事实上,这是一个脚本,可以连续扫描GDrive树并自动传输多个用户存放的文档。此时,如果无法共享,文档的创建者和管理员我们会通知其他人,以便他们可以手动共享。你好,abielita,谢谢你的评论。另一方面,我不能应用这些规定。事实上,这是一个脚本,可以连续扫描GDrive树,并自动传输多个用户存放的文档。此时,如果无法共享,文档的创建者并通知管理员,以便他们可以手动共享。