> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit repeating follow-ups

> How to update a repeating follow-up with CRMScript

You can change either one or all future repetitions of a [recurring follow-up][1].

## Change one repetition

Change only this instance, the change will not affect other times.

Postponing the current follow-up by 2 hours:

```crmscript theme={null}
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);
}
```

## Change all future repetitions

Change all future instances including this one - the change will apply to this follow-up in the future as well.

```crmscript theme={null}
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);
    }
  }
}
```

[1]: ../../../../diary/learn/recurrence/index


## Related topics

- [Stop repeating follow-ups](/en/automation/crmscript/howto/diary/stop-recurrence.md)
- [Repeating follow-ups](/en/diary/learn/recurrence/index.md)
- [Edit follow-up](/en/diary/learn/edit-follow-up.md)
- [Create repeating follow-ups](/en/automation/crmscript/howto/diary/create-recurring-appointment.md)
- [Variables for follow-ups](/en/document/templates/variables/for-appointments.md)
- [Schedule repeating follow-up](/en/diary/learn/recurrence/create.md)
