I'm getting this error, even though the function completes the task:Exception: The parameters (String,String) don't match the method signature for CalendarApp.Calendar.createAllDayEventI have written a script to automatically generate calendar entries from data in a spreadsheet. There are two identical functions in the full script, but for some reason the last function posts this error.function releaseCalendarAutomation(){createCalendarEventsTypeA();Utilities.sleep(20000);createCalendarTypeB();}}function createCalendarEventsTypeA(){let contentReleaseCalendar = CalendarApp.getCalendarById("[calendarID]@group.calendar.google.com");let sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('CalendarAutomationTypeA');let releases = sheet.getDataRange().getValues();releases.splice(0,3);releases.forEach(function(entry) {contentReleaseCalendar.createAllDayEvent(entry[3]+entry[1], entry[0]);Utilities.sleep(250);});}function createCalendarEventsTypeB(){let contentReleaseCalendar = CalendarApp.getCalendarById("[calendarID]@group.calendar.google.com");let sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('CalendarAutomationTypeB');let releases = sheet.getDataRange().getValues();releases.splice(0,3);releases.forEach(function(entry) {contentReleaseCalendar.createAllDayEvent(entry[3]+entry[1], entry[0]);Utilities.sleep(250);});}Sheet with data for TypeA events:Sheet with data for TypeB events:Any ideas as to why, with so similar data sheets and identical functions, the last function throws errors?
I've tried looking as you suggested, but it seems all rows have data in [0], but I still get this error:
I'm quite puzzled by the '(anonymous)' in there...
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/2ee6270a-8d9d-4a34-8690-9af16ac55c9bn%40googlegroups.com.