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

# NSAppointment

> Simple read-only appointment data.

Simple read-only appointment data.

## Constructors

### NSAppointment()

```crmscript theme={null}
NSAppointment
```

Initializes a new instance of the NSAppointment class.

## Methods

## GetActiveDate()

```crmscript theme={null}
DateTime GetActiveDate()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The date to be used for searching and showing.

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime activeDate = thing.GetActiveDate();
```

## GetAlarmLeadTime()

```crmscript theme={null}
TimeSpan GetAlarmLeadTime()
```

**Returns:** [CRMScript.Native.TimeSpan](CRMScript.Native.TimeSpan) - Alarm lead time.

**Example:**

```crmscript theme={null}
NSAppointment thing;
TimeSpan alarmLeadTime = thing.GetAlarmLeadTime();
```

## GetAlldayEvent()

```crmscript theme={null}
Integer GetAlldayEvent()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Is this an all day event? 0 = No, 1 = Yes.

## GetAppointmentId()

```crmscript theme={null}
Integer GetAppointmentId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Primary key.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer appointmentId = thing.GetAppointmentId();
```

## GetAssignedBy()

```crmscript theme={null}
Integer GetAssignedBy()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Who (last) assigned this appointment to associate\_id?

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer assignedBy = thing.GetAssignedBy();
```

## GetAssignedByFullName()

```crmscript theme={null}
String GetAssignedByFullName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The associate's culture formatted fullname (firstname, middleName and lastname).

**Example:**

```crmscript theme={null}
NSAppointment thing;
String assignedByFullName = thing.GetAssignedByFullName();
```

## GetAssignmentStatus()

```crmscript theme={null}
Integer GetAssignmentStatus()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Status if this appointment is in the process of being assigned to someone else.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer assignmentStatus = thing.GetAssignmentStatus();
```

## GetAssociateFullName()

```crmscript theme={null}
String GetAssociateFullName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The owner of the appointment - the associate whose diary/checklist the appointment is in.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String associateFullName = thing.GetAssociateFullName();
```

## GetAssociateId()

```crmscript theme={null}
Integer GetAssociateId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ID of associate whose diary the appointment is in, REQUIREd.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer associateId = thing.GetAssociateId();
```

## GetAssociateName()

```crmscript theme={null}
String GetAssociateName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The associate's name.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String associateName = thing.GetAssociateName();
```

## GetBookingType()

```crmscript theme={null}
Integer GetBookingType()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The type of booking the appointment represents.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer bookingType = thing.GetBookingType();
```

## GetCautionWarning()

```crmscript theme={null}
Integer GetCautionWarning()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Status field to indicate appointments that have some sort of problem. See \<xref href="CRMScript.NetServer.AppointmentCautionWarning" data-throw-if-not-resolved="false">\</xref>

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer cautionWarning = thing.GetCautionWarning();
```

## GetColorIndex()

```crmscript theme={null}
Integer GetColorIndex()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Appointment color, used only in Japanese versions. Western versions take colour from Task. See \<xref href="CRMScript.NetServer.ColorIndex" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer colorIndex = thing.GetColorIndex();
```

## GetCompleted()

```crmscript theme={null}
Integer GetCompleted()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The Completed state.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer completed = thing.GetCompleted();
```

## GetContactId()

```crmscript theme={null}
Integer GetContactId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Contact ID of owning contact, may be 0

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer contactId = thing.GetContactId();
```

## GetContactName()

```crmscript theme={null}
String GetContactName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The contact associated with the appointment.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String contactName = thing.GetContactName();
```

## GetCreatedBy()

```crmscript theme={null}
String GetCreatedBy()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Who created the appointment. Associate name.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String createdBy = thing.GetCreatedBy();
```

## GetCreatedByAssociateId()

```crmscript theme={null}
Integer GetCreatedByAssociateId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ID of the associate that created the appointment.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer createdByAssociateId = thing.GetCreatedByAssociateId();
```

## GetCreatedByFullName()

```crmscript theme={null}
String GetCreatedByFullName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Who created the appointment. Full name.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String createdByFullName = thing.GetCreatedByFullName();
```

## GetCreatedDate()

```crmscript theme={null}
DateTime GetCreatedDate()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - Appointment creation date.

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime createdDate = thing.GetCreatedDate();
```

## GetDescription()

```crmscript theme={null}
String GetDescription()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The appointment's textbox; holds a descriptive text about the appointment. Filled out by the user.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String description = thing.GetDescription();
```

## GetEndDate()

```crmscript theme={null}
DateTime GetEndDate()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - Date + end time planned.

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime endDate = thing.GetEndDate();
```

## GetFreeBusy()

```crmscript theme={null}
Integer GetFreeBusy()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - What kind of time is this? 0 = Busy, 1 = Free.

## GetHasAlarm()

```crmscript theme={null}
Bool GetHasAlarm()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Does this appointment have an alarm.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool hasAlarm = thing.GetHasAlarm();
```

## GetInvitationStatus()

```crmscript theme={null}
Integer GetInvitationStatus()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Status if this appointment represents an invitation.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer invitationStatus = thing.GetInvitationStatus();
```

## GetIsAlldayEvent()

```crmscript theme={null}
Bool GetIsAlldayEvent()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if all day event.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isAlldayEvent = thing.GetIsAlldayEvent();
```

## GetIsBooking()

```crmscript theme={null}
Bool GetIsBooking()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if this appointment is a booking.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isBooking = thing.GetIsBooking();
```

## GetIsBookingMain()

```crmscript theme={null}
Bool GetIsBookingMain()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if this appointment is a booking and current associate is the owner; False if it is a booking and current associate is a participant.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isBookingMain = thing.GetIsBookingMain();
```

## GetIsFree()

```crmscript theme={null}
Bool GetIsFree()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if free, false if busy.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isFree = thing.GetIsFree();
```

## GetIsPublished()

```crmscript theme={null}
Bool GetIsPublished()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if appointment have an entry in published table.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isPublished = thing.GetIsPublished();
```

## GetIsRecurrence()

```crmscript theme={null}
Bool GetIsRecurrence()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if the appointment is part of a recurring pattern.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isRecurrence = thing.GetIsRecurrence();
```

## GetJoinVideomeetUrl()

```crmscript theme={null}
String GetJoinVideomeetUrl()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Blank when not a video meeting. Filled with Join Meeting URL when created.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String joinVideomeetUrl = thing.GetJoinVideomeetUrl();
```

## GetLocation()

```crmscript theme={null}
String GetLocation()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Location for appointment, defaulted from invited resource of type place and other rules, but you can write anything you want here.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String location = thing.GetLocation();
```

## GetMotherId()

```crmscript theme={null}
Integer GetMotherId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ID of mother appointment; self if booking master, master ID if booking slave, 0 if normal appointment. However, if 0 and assoc\_id != reg\_id then this is an assigned appointment, indicated vt type = kBooking.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer motherId = thing.GetMotherId();
```

## GetPersonFullName()

```crmscript theme={null}
String GetPersonFullName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The full name of the person this appointment belongs to.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String personFullName = thing.GetPersonFullName();
```

## GetPersonId()

```crmscript theme={null}
Integer GetPersonId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Person ID of person the appointment is with, may be 0

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer personId = thing.GetPersonId();
```

## GetPriorityId()

```crmscript theme={null}
Integer GetPriorityId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Link to priority list.

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer priorityId = thing.GetPriorityId();
```

## GetPriorityName()

```crmscript theme={null}
String GetPriorityName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of the appointments priority.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String priorityName = thing.GetPriorityName();
```

## GetPrivate()

```crmscript theme={null}
Integer GetPrivate()
```

**Returns:** [CRMScript.NetServer.AppointmentPrivate](CRMScript.NetServer.AppointmentPrivate) - De-normalization of visibleFor status. See \<xref href="CRMScript.NetServer.AppointmentPrivate" data-throw-if-not-resolved="false">\</xref>

<Note>
  Obsolete, but still maintained field for appointment privacy.
</Note>

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer private = thing.GetPrivate();
```

## GetProjectId()

```crmscript theme={null}
Integer GetProjectId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ID of project referred to, may be 0

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer projectId = thing.GetProjectId();
```

## GetProjectName()

```crmscript theme={null}
String GetProjectName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of the project this appointment belong to. Blank if no project is connected.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String projectName = thing.GetProjectName();
```

## GetRecurringEndDate()

```crmscript theme={null}
DateTime GetRecurringEndDate()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime)

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime recurringEndDate = thing.GetRecurringEndDate();
```

## GetRecurringPattern()

```crmscript theme={null}
Integer GetRecurringPattern()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - See \<xref href="CRMScript.NetServer.RecurrencePattern" data-throw-if-not-resolved="false">\</xref>

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer recurringPattern = thing.GetRecurringPattern();
```

## GetRecurringStartDate()

```crmscript theme={null}
DateTime GetRecurringStartDate()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime)

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime recurringStartDate = thing.GetRecurringStartDate();
```

## GetRejectReason()

```crmscript theme={null}
String GetRejectReason()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Why was this booking or assignment rejected, the RejectReason list is a source of suggestions but you can write anything here.

**Example:**

```crmscript theme={null}
NSAppointment thing;
String rejectReason = thing.GetRejectReason();
```

## GetSaleId()

```crmscript theme={null}
Integer GetSaleId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Owning sale, if any (may be 0).

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer saleId = thing.GetSaleId();
```

## GetSaleName()

```crmscript theme={null}
String GetSaleName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Heading of Owning sale, if any. (may be blank).

**Example:**

```crmscript theme={null}
NSAppointment thing;
String saleName = thing.GetSaleName();
```

## GetStartDate()

```crmscript theme={null}
DateTime GetStartDate()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - date + start time planned.

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime startDate = thing.GetStartDate();
```

## GetTask()

```crmscript theme={null}
String GetTask()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String)

<Note>
  Task comprises the different types of activities, like "Phone call", "Meeting" and so on.
</Note>

**Example:**

```crmscript theme={null}
NSAppointment thing;
String task = thing.GetTask();
```

## GetTaskType()

```crmscript theme={null}
Integer GetTaskType()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The different task types of the appointment, if the activity is an appointment, task, phone. See \<xref href="CRMScript.NetServer.TaskType" data-throw-if-not-resolved="false">\</xref>

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer taskType = thing.GetTaskType();
```

## GetType()

```crmscript theme={null}
Integer GetType()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The different types of appointment, if the appointment is supposed to be shown in the diary or checklist, or if it's a document.

<Note>
  See the different types of appointments in the database manual.
</Note>

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer type = thing.GetType();
```

## SetActiveDate(DateTime)

```crmscript theme={null}
Void SetActiveDate(DateTime activeDate)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime activeDate;
thing.SetActiveDate(activeDate);
```

## SetAlarmLeadTime(TimeSpan)

```crmscript theme={null}
Void SetAlarmLeadTime(TimeSpan alarmLeadTime)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
TimeSpan alarmLeadTime;
thing.SetAlarmLeadTime(alarmLeadTime);
```

## SetAlldayEvent(Integer)

```crmscript theme={null}
Void SetAlldayEvent(Integer allDayEvent)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## SetAppointmentId(Integer)

```crmscript theme={null}
Void SetAppointmentId(Integer appointmentId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer appointmentId;
thing.SetAppointmentId(appointmentId);
```

## SetAssignedBy(Integer)

```crmscript theme={null}
Void SetAssignedBy(Integer assignedBy)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer assignedBy;
thing.SetAssignedBy(assignedBy);
```

## SetAssignedByFullName(String)

```crmscript theme={null}
Void SetAssignedByFullName(String assignedByFullName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String assignedByFullName;
thing.SetAssignedByFullName(assignedByFullName);
```

## SetAssignmentStatus(Integer)

```crmscript theme={null}
Void SetAssignmentStatus(Integer assignmentStatus)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer assignmentStatus;
thing.SetAssignmentStatus(assignmentStatus);
```

## SetAssociateFullName(String)

```crmscript theme={null}
Void SetAssociateFullName(String associateFullName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String associateFullName;
thing.SetAssociateFullName(associateFullName);
```

## SetAssociateId(Integer)

```crmscript theme={null}
Void SetAssociateId(Integer associateId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer associateId;
thing.SetAssociateId(associateId);
```

## SetAssociateName(String)

```crmscript theme={null}
Void SetAssociateName(String associateName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String associateName;
thing.SetAssociateName(associateName);
```

## SetBookingType(Integer)

```crmscript theme={null}
Void SetBookingType(Integer bookingType)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer bookingType;
thing.SetBookingType(bookingType);
```

## SetCautionWarning(Integer)

```crmscript theme={null}
Void SetCautionWarning(Integer cautionWarning)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer cautionWarning;
thing.SetCautionWarning(cautionWarning);
```

## SetColorIndex(Integer)

```crmscript theme={null}
Void SetColorIndex(Integer colorIndex)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer colorIndex;
thing.SetColorIndex(colorIndex);
```

## SetCompleted(Integer)

```crmscript theme={null}
Void SetCompleted(Integer completed)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer completed;
thing.SetCompleted(completed);
```

## SetContactId(Integer)

```crmscript theme={null}
Void SetContactId(Integer contactId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer contactId;
thing.SetContactId(contactId);
```

## SetContactName(String)

```crmscript theme={null}
Void SetContactName(String contactName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String contactName;
thing.SetContactName(contactName);
```

## SetCreatedBy(String)

```crmscript theme={null}
Void SetCreatedBy(String createdBy)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String createdBy;
thing.SetCreatedBy(createdBy);
```

## SetCreatedByAssociateId(Integer)

```crmscript theme={null}
Void SetCreatedByAssociateId(Integer createdByAssociateId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer createdByAssociateId;
thing.SetCreatedByAssociateId(createdByAssociateId);
```

## SetCreatedByFullName(String)

```crmscript theme={null}
Void SetCreatedByFullName(String createdByFullName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String createdByFullName;
thing.SetCreatedByFullName(createdByFullName);
```

## SetCreatedDate(DateTime)

```crmscript theme={null}
Void SetCreatedDate(DateTime createdDate)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime createdDate;
thing.SetCreatedDate(createdDate);
```

## SetDescription(String)

```crmscript theme={null}
Void SetDescription(String description)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String description;
thing.SetDescription(description);
```

## SetEndDate(DateTime)

```crmscript theme={null}
Void SetEndDate(DateTime endDate)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime endDate;
thing.SetEndDate(endDate);
```

## SetFreeBusy(Integer)

```crmscript theme={null}
Void SetFreeBusy(Integer freeBusy)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## SetHasAlarm(Bool)

```crmscript theme={null}
Void SetHasAlarm(Bool hasAlarm)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool hasAlarm;
thing.SetHasAlarm(hasAlarm);
```

## SetInvitationStatus(Integer)

```crmscript theme={null}
Void SetInvitationStatus(Integer invitationStatus)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer invitationStatus;
thing.SetInvitationStatus(invitationStatus);
```

## SetIsAlldayEvent(Bool)

```crmscript theme={null}
Void SetIsAlldayEvent(Bool isAlldayEvent)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isAlldayEvent;
thing.SetIsAlldayEvent(isAlldayEvent);
```

## SetIsBooking(Bool)

```crmscript theme={null}
Void SetIsBooking(Bool isBooking)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isBooking;
thing.SetIsBooking(isBooking);
```

## SetIsBookingMain(Bool)

```crmscript theme={null}
Void SetIsBookingMain(Bool isBookingMain)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isBookingMain;
thing.SetIsBookingMain(isBookingMain);
```

## SetIsFree(Bool)

```crmscript theme={null}
Void SetIsFree(Bool isFree)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isFree;
thing.SetIsFree(isFree);
```

## SetIsPublished(Bool)

```crmscript theme={null}
Void SetIsPublished(Bool isPublished)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isPublished;
thing.SetIsPublished(isPublished);
```

## SetIsRecurrence(Bool)

```crmscript theme={null}
Void SetIsRecurrence(Bool isRecurrence)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Bool isRecurrence;
thing.SetIsRecurrence(isRecurrence);
```

## SetJoinVideomeetUrl(String)

```crmscript theme={null}
Void SetJoinVideomeetUrl(String joinVideomeetUrl)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String joinVideomeetUrl;
thing.SetJoinVideomeetUrl(joinVideomeetUrl);
```

## SetLocation(String)

```crmscript theme={null}
Void SetLocation(String location)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String location;
thing.SetLocation(location);
```

## SetMotherId(Integer)

```crmscript theme={null}
Void SetMotherId(Integer motherId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer motherId;
thing.SetMotherId(motherId);
```

## SetPersonFullName(String)

```crmscript theme={null}
Void SetPersonFullName(String personFullName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String personFullName;
thing.SetPersonFullName(personFullName);
```

## SetPersonId(Integer)

```crmscript theme={null}
Void SetPersonId(Integer personId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer personId;
thing.SetPersonId(personId);
```

## SetPriorityId(Integer)

```crmscript theme={null}
Void SetPriorityId(Integer priorityId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer priorityId;
thing.SetPriorityId(priorityId);
```

## SetPriorityName(String)

```crmscript theme={null}
Void SetPriorityName(String priorityName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String priorityName;
thing.SetPriorityName(priorityName);
```

## SetPrivate(Integer)

Obsolete, but still maintained field for appointment privacy.

```crmscript theme={null}
Void SetPrivate(Integer private)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer private;
thing.SetPrivate(private);
```

## SetProjectId(Integer)

```crmscript theme={null}
Void SetProjectId(Integer projectId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer projectId;
thing.SetProjectId(projectId);
```

## SetProjectName(String)

```crmscript theme={null}
Void SetProjectName(String projectName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String projectName;
thing.SetProjectName(projectName);
```

## SetRecurringEndDate(DateTime)

```crmscript theme={null}
Void SetRecurringEndDate(DateTime recurringEndDate)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime recurringEndDate;
thing.SetRecurringEndDate(recurringEndDate);
```

## SetRecurringPattern(Integer)

```crmscript theme={null}
Void SetRecurringPattern(Integer pattern)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer pattern;
thing.SetRecurringPattern(pattern);
```

## SetRecurringStartDate(DateTime)

```crmscript theme={null}
Void SetRecurringStartDate(DateTime recurringStartDate)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime recurringStartDate;
thing.SetRecurringStartDate(recurringStartDate);
```

## SetRejectReason(String)

```crmscript theme={null}
Void SetRejectReason(String rejectReason)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String rejectReason;
thing.SetRejectReason(rejectReason);
```

## SetSaleId(Integer)

```crmscript theme={null}
Void SetSaleId(Integer saleId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer saleId;
thing.SetSaleId(saleId);
```

## SetSaleName(String)

```crmscript theme={null}
Void SetSaleName(String saleName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String saleName;
thing.SetSaleName(saleName);
```

## SetStartDate(DateTime)

```crmscript theme={null}
Void SetStartDate(DateTime startDate)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
DateTime startDate;
thing.SetStartDate(startDate);
```

## SetTask(String)

```crmscript theme={null}
Void SetTask(String task)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
String task;
thing.SetTask(task);
```

## SetTaskType(Integer)

```crmscript theme={null}
Void SetTaskType(Integer taskType)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer taskType;
thing.SetTaskType(taskType);
```

## SetType(Integer)

```crmscript theme={null}
Void SetType(Integer type)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSAppointment thing;
Integer type;
thing.SetType(type);
```


## Related topics

- [NSAppointmentAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSAppointmentAgent.md)
