Enddate = EventEnd.toDate("yyyy-MM-dd");
EventCollection = Collection();
EventCollection = zoho.crm.searchRecords("Events", "(End_DateTime:starts_with:"+Enddate+")");
for each eventday in EventCollection
{
//create a list of events on the same day as the Event that triggered the workflow
day = eventday.getJSON("End_DateTime").getPrefix("T").toDate("yyyy-MM-dd");
...
}
Error is returned on the last line: "day = eventday.getJSON..."
The goal of "searchRecords" is to pull records from the Meeting module that fall on a specific day, regardless of the time of day.
If I use the task getRecords("Events") the function works, but it will return many hundreds of useless events that will drastically slow the function down in the following "for each" loops.