Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
How to update a repeating follow-up with CRMScript
Integer aId = 234; NSAppointmentAgent appointmentAgent; NSAppointmentEntity a = appointmentAgent.GetAppointmentEntity(aId); NSRecurrenceInfo r = a.GetRecurrence(); if (r.GetIsRecurrence()) { r.SetStartDate(r.GetStartDate().addHour(2)); newAppointment.SetRecurrence(r); newAppointment = appointmentAgent.SaveAppointmentEntity(newAppointment); }
Integer aId = 234; DateTime now; NSAppointmentAgent appointmentAgent; NSAppointmentEntity a = appointmentAgent.GetAppointmentEntity(aId); NSRecurrenceInfo r = a.GetRecurrence(); if (r.GetIsRecurrence()) { NSAppointment[] appointmentList = appointmentAgent.GetAppointmentRecords(0,r.GetRecurrenceId()); for(Integer i = 0; i < appointmentList.length(); i++) { if (appointmentList[i].GetStartDate().diff(now) > 0) { NSAppointmentEntity futureAppointment = appointmentAgent.GetAppointmentEntity(appointmentList[i].GetAppointmentId()); // set changes here futureAppointment = appointmentAgent.SaveAppointmentEntity(futureAppointment); } } }
Was this page helpful?