z = zoho.crm.getRecordById("Deals",5341860000008118012);
Event_Date = z.getJSON("Event_Start_Time");
info Event_Date;
date = Event_Date.getPrefix("T");
info date;
time = Event_Date.getSuffix("T");
info time;
hour = time.getPrefix(":");
info hour;
hourtonumber = hour.toNumber();
info hourtonumber;
min = time.getSuffix(":");
newmin=min.getPrefix(":") ;
mintonu=newmin.toNumber();
addhr = hourtonumber + 5;
info addhr;
Event_Date = z.get("Event_Start_Time").addHour(addhr).addMinutes(mintonu).toString("yyyy-MM-dd'T'HH:mm:ss'+08:00'");
info Event_Date;
mp = Map();
mp.put("Event_Start_Time",Event_Date);
test = zoho.crm.updateRecord("Deals",5341860000008118012,mp);
info test;
Comments
Post a Comment