> ## 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.

# Stop repeating follow-ups

> How to stop a repeating follow-up with CRMScript

When you stop a [recurrence][1], all repetitions of the follow-up **after the occurrence you edit** are deleted.

If you cancel the recurrence of the 1st in a series, the pattern is deleted and the follow-up becomes a single appointment/call/task.

```crmscript theme={null}
Integer aId = 234;
DateTime now;

NSAppointmentAgent appointmentAgent;
NSAppointmentEntity a = appointmentAgent.GetAppointmentEntity(aId);

NSRecurrenceInfo r = a.GetRecurrence();
if (r.GetIsRecurrence()) {
  r.SetIsRecurrence(false);
  r.SetPattern(0);
  a.SetRecurrence(r);
  a = appointmentAgent.SaveAppointmentEntity(a);
}
```

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


## Related topics

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