TypeError: Cannot find function createAllDayEvent in object Calendar
TypeError: Cannot find function createAllDayEvent in object Calendar
下面是我的代码片段。我已经好几个月没有修改它了,它一直运行顺利,直到今天我突然收到 "TypeError: Cannot find function createAllDayEvent in object Calendar." 当我尝试提交我的 Google 表格时。
谁能告诉我可能是什么原因?它是 Google 更新还是我需要更新的内容,因为 Google 更改了某些内容?谢谢
//Get the calendar
try{
var cal = CalendarApp.getCalendarById('davie.k12.nc.us_d2mv2eb8aspuant1vb5j6r3sis@group.calendar.google.com');//Change the calendar id, this one is shared with you and is a test agenda where we can write ANYTHING ;-)
if(cal){
//Create the events
Logger.log(eventDate);
var newID = cal.createAllDayEvent(eventCalSubject, eventDate, {description:eventCalDetails}).getId();
}
我的脚本也在过去 24 小时内崩溃了。我提交了一个问题:
https://issuetracker.google.com/67890149
参考示例产生相同的错误:
// Creates an all-day event for the Woodstock festival (August 15th to 17th) and logs the ID.
var event = CalendarApp.getDefaultCalendar().createAllDayEvent('Woodstock Festival',
new Date('August 15, 1969'),
new Date('August 18, 1969'),
{location: 'Bethel, White Lake, New York, U.S.', sendInvites: true});
Logger.log('Event ID: ' + event.getId());
下面是我的代码片段。我已经好几个月没有修改它了,它一直运行顺利,直到今天我突然收到 "TypeError: Cannot find function createAllDayEvent in object Calendar." 当我尝试提交我的 Google 表格时。
谁能告诉我可能是什么原因?它是 Google 更新还是我需要更新的内容,因为 Google 更改了某些内容?谢谢
//Get the calendar
try{
var cal = CalendarApp.getCalendarById('davie.k12.nc.us_d2mv2eb8aspuant1vb5j6r3sis@group.calendar.google.com');//Change the calendar id, this one is shared with you and is a test agenda where we can write ANYTHING ;-)
if(cal){
//Create the events
Logger.log(eventDate);
var newID = cal.createAllDayEvent(eventCalSubject, eventDate, {description:eventCalDetails}).getId();
}
我的脚本也在过去 24 小时内崩溃了。我提交了一个问题: https://issuetracker.google.com/67890149
参考示例产生相同的错误:
// Creates an all-day event for the Woodstock festival (August 15th to 17th) and logs the ID.
var event = CalendarApp.getDefaultCalendar().createAllDayEvent('Woodstock Festival',
new Date('August 15, 1969'),
new Date('August 18, 1969'),
{location: 'Bethel, White Lake, New York, U.S.', sendInvites: true});
Logger.log('Event ID: ' + event.getId());