2017-10-17 61 views
1

這是我的代碼片段。我沒有修改它在幾個月,它一直工作沒有搭配,直到突然間今天我得到一個「類型錯誤:無法找到函數createAllDayEvent對象日曆。」當我嘗試提交我的Google表單時。TypeError:在對象中找不到函數createAllDayEvent Calendar

任何人都可以指出我可能是什麼原因?是Google更新還是他們需要更新的內容?因爲Google改變了一些內容?謝謝

//Get the calendar 
    try{ 
    var cal = CalendarApp.getCalendarById('[email protected].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(); 
    } 

回答

3

我的腳本在過去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()); 
+0

謝謝...我將繼續這樣的檢查,看是否有解決方案。 –

+0

再次感謝,這是Google的問題,目前它似乎已修復。 –

+0

我現在也跑了。看起來他們修理並關閉了票。 –

相關問題