> ## Documentation Index
> Fetch the complete documentation index at: https://superofficeas-worktree-351-fix-webapi-escaped-anchors.mintlify.site/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
