使用 Calendar.Events.list 时关于 Google Apps 脚本的高级日历服务,如何过滤多个 privateExtendedProperty 值?
var existing_events = Calendar.Events.list(calendar,{'privateExtendedProperty':'copperOpportunityId='+opportunity['id'],
'privateExtendedProperty':'copperFieldId=shoots',
'orderBy':"startTime",
'singleEvents':true
}
);
不起作用,因为过滤器对象的第二个“privateExtendedProperty”属性会覆盖第一个属性,并且 API 只接收后一个属性。
This parameter might be repeated multiple times to return events that match all given constraints.
最佳答案
解决方案是传递属性值数组:
var existing_events = Calendar.Events.list(calendar,{'privateExtendedProperty':
['copperOpportunityId='+opportunity['id'],
'copperFieldId=shoots'
],
'orderBy':"startTime",
'singleEvents':true
}
);
关于google-apps-script - Google Apps 脚本 - 如何使用高级日历服务过滤多个属性上的日历事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61240858/