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

# Update appointment

> How to update, move, and delete appointments; mark an appointment as complete

## NSAppointment UpdateAppointment(Integer p0, DateTime p1, DateTime p2, Integer p3, Integer p4, Integer associateId)

Change the description, for example, to add an agenda:

```crmscript theme={null}
NSAppointmentAgent appointmentAgent;
NSAppointmentEntity appointment = appointmentAgent.GetAppointmentEntity(146);

appointment.SetDescription("Agenda: 1. Welcome 2. Annual report 3. Election 4. Misc");
appointmentAgent.SaveAppointmentEntity(appointment);
```

## Move appointment

Postpone an existing appointment by 1 week (reschedule):

```crmscript theme={null}
NSAppointmentAgent appointmentAgent;

NSAppointmentEntity a = appointmentAgent.GetAppointmentEntity(146);

DateTime start = a.GetStartDate();
a.SetStartDate(start.addDay(7));

DateTime end = a.GetEndDate();
a.SetEndDate(end.addDay(7));

a = appointmentAgent.SaveAppointmentEntity(a);
```

## Mark as complete

*Completed* means that the status is **3**.

### Void SetCompleted(Integer Completed)

```crmscript theme={null}
NSAppointmentAgent appointmentAgent;

NSAppointmentEntity a = appointmentAgent.GetAppointmentEntity(77);
a.SetCompleted(3);
appointmentAgent.SaveAppointmentEntity(a);
```

### Integer GetCompleted()

You can't edit completed follow-ups until you have undone their Completed status!

Use `GetCompleted()` to check the status. Toggle it to **0** to do your edits and then toggle it back if applicable.

```crmscript theme={null}
NSAppointmentAgent appointmentAgent;

NSAppointmentEntity e = appointmentAgent.GetAppointmentEntity(77);

if (e.GetCompleted() == 3) {
  e.SetCompleted(0);
  appointmentAgent.SaveAppointmentEntity(e);
}
```

## Delete appointment

### Void DeleteAppointmentEntity(Integer appointmentEntityId)

```crmscript theme={null}
NSAppointmentAgent appointmentAgent;
appointmentAgent.DeleteAppointmentEntity(142);
```


## Related topics

- [Update Appointment](/en/api/reference/restful/agent/appointment_agent/update-appointment.md)
- [Update Appointment With Mode](/en/api/reference/restful/agent/appointment_agent/update-appointment-with-mode.md)
- [Update Appointment With Mode And Email](/en/api/reference/restful/agent/appointment_agent/update-appointment-with-mode-and-email.md)
- [Update Appointment From Ics Response](/en/api/reference/restful/agent/appointment_agent/update-appointment-from-ics-response.md)
- [Appointment table](/en/api/bulk-operations/bulk-update/reference/appointment-table.md)
- [Update a SuperOffice CRM Appointment action](/integrations/zapier/howto/actions/update-appointment.md)
