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

# Get follow-ups belonging to a series

> How to get follow-ups belonging to a series with CRMScript

## NSAppointment\[] GetAppointmentRecords(Integer motherId, Integer recurrenceRuleId)

```crmscript! theme={null}
Integer recurrenceId = 1;
NSAppointmentAgent appointmentAgent;
NSAppointment[] appointmentList = appointmentAgent.GetAppointmentRecords(0,recurrenceId);

for(Integer i = 0; i < appointmentList.length(); i++) {
  printLine("ID: " + appointmentList[i].GetAppointmentId().toString() + "\t At: " + appointmentList[i].GetStartDate().toString());
}
```

<Tip>
  Set `motherId` to **0** unless you're working with [meeting invitations][1].
</Tip>

[1]: ./book-resource


## Related topics

- [Follow-ups](/en/diary/learn/follow-ups.md)
- [Repeating follow-ups](/en/diary/learn/recurrence/index.md)
- [Stop repeating follow-ups](/en/automation/crmscript/howto/diary/stop-recurrence.md)
- [Working with follow-ups (appointments) in API](/en/diary/dev/index.md)
- [Schedule repeating follow-up](/en/diary/learn/recurrence/create.md)
- [Stop repeating follow-up](/en/diary/learn/recurrence/stop.md)
