Skip to main content
Collection of all services that works with Appointment data.

Constructors

NSAppointmentAgent()

Collection of all services that works with Appointment data.

Methods

Accept(Integer,Integer)

Accepts an appointment invitation.
Returns: CRMScript.Global.Void Example:

AcceptRejected(Integer,Integer)

Accepts that an invited participant has rejected your invitation or assignment.
Returns: CRMScript.NetServer.NSAppointmentEntity Example:

AcceptWithEmailConfirmation(Integer,Integer)

Accepts an appointment invitation and sends an email confirmation to the meeting organizer.
Returns: CRMScript.Global.Void Example:

AcceptWithSmtpEmailConfirmation(Integer,Integer)

Accepts an appointment invitation and sends an email confirmation to the meeting organizer.
Returns: CRMScript.Global.Void Example:

AssignTo(Integer,Integer)

Assigns an appointment to another person.
Returns: CRMScript.NetServer.NSAppointmentEntity - Updated NSAppointmentEntity. Example:

CalculateDays()

Calculates the set of dates that represents a recurrence pattern. Adds conflict information to each date.
Returns: CRMScript.NetServer.NSRecurrenceInfo

CanAssignToProjectMember(Integer,Integer)

Returns: CRMScript.Global.Bool

CleanUpBookingDeleted(Integer[])

Deletes all appointments(within the appointmentIds array) with status BookingDeleted.
Returns: CRMScript.Global.Integer

CleanUpRecurringBookingDeleted()

Deletes all appointments with status BookingDeleted and for logged-in user.
Returns: CRMScript.Global.Integer

CreateAndAccept(Integer,Integer)

Creates an appointment from an emailItem invitation and accepting it.
Returns: CRMScript.Global.Void

CreateAndAcceptWithEmailConfirmation(Integer,Integer)

Creates an appointment from an emailItem invitation and accepting it with email confirmation to the meeting organizer.
Returns: CRMScript.Global.Void

CreateAppointmentForUID(String)

Creates an invitation record and an appointment with a given UID to reserve it if the UID is unused, otherwise null.
Returns: CRMScript.NetServer.NSAppointmentEntity - The newly created NSAppointmentEntity or null if the UID is in the DB already. Example:

CreateDefaultAppointmentEntity()

Sets default values into a new NSAppointmentEntity.
Returns: CRMScript.NetServer.NSAppointmentEntity - A new NSAppointmentEntity with default values.
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance.
Example:

CreateDefaultAppointmentEntityByType(Integer)

Creates an NSAppointmentEntity populated with the default values for the specific type.
Returns: CRMScript.NetServer.NSAppointmentEntity Example:

CreateDefaultAppointmentEntityByTypeAndAssociate(Integer,Integer)

Creates an NSAppointmentEntity populated with the default values for the specific type and owner.
Returns: CRMScript.NetServer.NSAppointmentEntity Example:

CreateDefaultAppointmentEntityFromProjectSuggestion(Integer,Integer,Bool,Integer)

Returns: CRMScript.NetServer.NSAppointmentEntity

CreateDefaultAppointmentEntityFromSaleSuggestion(Integer,Integer,Bool,Integer)

Creates an appointment based on a suggested appointment.
Returns: CRMScript.NetServer.NSAppointmentEntity - The newly created appointment. Example:

CreateDefaultRecurrence()

Creates an NSRecurrenceInfo object populated with the default values for the specific type.
Returns: CRMScript.NetServer.NSRecurrenceInfo Example:

CreateDefaultRecurrenceByDate()

Creates an NSRecurrenceInfo object populated with the default values for the specific type.
Returns: CRMScript.NetServer.NSRecurrenceInfo

CreateDefaultReOpenAppointment(Integer)

A re-open appointment should be created as a reminder to re-open the sale at a certain date with information regarding the stalled sale.
Returns: CRMScript.NetServer.NSAppointmentEntity Example:

CreateDefaultSuggestedAppointmentEntity()

Sets default values into a new NSSuggestedAppointmentEntity.
Returns: CRMScript.NetServer.NSSuggestedAppointmentEntity - A new NSSuggestedAppointmentEntity with default values.
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance.
Example:

CreateDefaultTaskListItem()

Sets default values into a new NSTaskListItem.
Returns: CRMScript.NetServer.NSTaskListItem - A new NSTaskListItem with default values.
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance.
Example:

DeclineInvitationFromEmailItem(Integer,String)

Declining an appointment invitation where no tentative appointments have been created.
Returns: CRMScript.Global.Void

Delete(Integer,Integer,Bool)

Deletes a booking
Returns: CRMScript.Global.Void

DeleteAppointmentEntity(Integer)

Deletes the NSAppointmentEntity.
Returns: CRMScript.Global.Void Example:

GenerateLead(Integer,String,String,Integer,String,String,String,String,String,String,String,String)

Adds a sales lead (task) to a contact in SuperOffice. If the contact or person is known, the sales lead is added to the current contact. If not, a new contact is created, with the associate with ownerIdForNewContact as responsible (Our Contact). A relation is created between the contact and the person submitting the lead. Based on wether the person the request is made for is found or not, the following happens: If the person is found, the person, person’s contact and sales representative is returned. If neither the person nor the contact is found a new person and contact is created (if sufficient data is supplied), and the person, person’s contact and sales representative is returned. If the contact and not the person is found a new person is created on this contact, and the contact, salesrep, and person is returned (if there was enough data to return the person).
Returns: CRMScript.NetServer.NSSalesActivity
If more than one contact is found a list of contacts is returned.
Example:

GetActivityInformationListByDatesAndAssociate(Integer)

Gets activity information for one or more days according to the given date interval.
Returns: CRMScript.NetServer.NSActivityInformationListItem[]
The time portion of the dates is ignored. Private appointments are counted, but may not be visible through tooltips or other more detailed services.
Example:

GetAlarms(Bool,Bool,Integer)

Returns: CRMScript.NetServer.NSMultiAlarmData

GetAppointment(Integer)

Gets an NSAppointment object.
Returns: CRMScript.NetServer.NSAppointment Example:

GetAppointmentEntity(Integer)

Gets an NSAppointmentEntity object.
Returns: CRMScript.NetServer.NSAppointmentEntity Example:

GetAppointmentFromUID(String)

Gets the appointment that corresponds to the given UID.
Returns: CRMScript.NetServer.NSAppointmentEntity - Appointment corresponding to uId. Example:

GetAppointmentHaveParticipantsWithEmail(Integer)

Checks if any of the participants is marked to receive emails on this appointment.
Returns: CRMScript.Global.Bool - False if no participants are defined. Example:

GetAppointmentList(Integer[])

Retrieves an array of NSAppointment objects.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetAppointmentRecords(Integer,Integer)

Gets all records involved in a booking and/or recurring appointments.
Returns: CRMScript.NetServer.NSAppointment[]

GetAppointmentsByTaskHeading(Integer)

Returns appointments of a specific appointment task heading.
Returns: CRMScript.NetServer.NSAppointment[]
Task represents the different types of activities, such as Phone call or Meeting.
Example:

GetAssociateDiary(Integer,Integer)

Returns: CRMScript.NetServer.NSAppointment[]

GetAssociatesDiary(Integer[])

Returns: CRMScript.NetServer.NSAppointment[]

GetCanInsertForAssociates(Integer[])

Checks if the current associate can create appointments in the diary of other associates.
Returns: CRMScript.Global.Bool[] - An array of Bool corresponding to the associate array input parameter. Example:

GetContactAppointments(Integer,Integer)

Returns a specified number of appointments within a time range. The appointments belong to the contact specified.
Returns: CRMScript.NetServer.NSAppointment[]
If the logged-in user is not allowed to view this persons appointments an exception is thrown.
Example:

GetContactAppointmentsByTask(Integer,Integer,Integer)

Returns a specified number of appointments of a specific appointment task type within a time range. The appointments belong to the contact specified.
Returns: CRMScript.NetServer.NSAppointment[]
Task represents the different types of activities, such as Phone call or Meeting.
Example:

GetContactAppointmentsByTaskHeading(Integer,Integer,Integer)

Returns a specified number of appointments of a specific appointment task heading within a time range. The appointments belong to the contact specified.
Returns: CRMScript.NetServer.NSAppointment[]
Task represents the different types of activities, such as Phone call or Meeting.
Example:

GetContactAppointmentsByTasks(Integer,Integer,Integer[])

Returns a specified number of appointments belonging to an array of appointment task types within a time range. The appointments belong to the contact specified.
Returns: CRMScript.NetServer.NSAppointment[]
Task represents the different types of activities, such as Phone call or Meeting.
Example:

GetContactAppointmentsByType(Integer,Integer,Integer)

Returns a specified number of appointments of a specific appointment type within a time range. The appointments belong to the contact specified.
Returns: CRMScript.NetServer.NSAppointment[]
If the logged-in user is not allowed to view this contacts appointments an exception is thrown.
Example:

GetDayInformationListByDatesAndAssociate(Integer)

Gets combined day information (activity + red-letter summary) for one or more days according to the given date interval.
Returns: CRMScript.NetServer.NSDayInformationListItem[]
The time portion of the dates is ignored. Private appointments are counted, but may not be visible through tooltips or other more detailed services.
Example:

GetDiaryByGroup(Integer,Integer,Integer)

Returns: CRMScript.NetServer.NSAppointment[]

GetMyAppointments(Integer)

Returns a specified number of appointments within a time range. The appointments belong to the currently logged-on user.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetMyDiary(Integer)

Returns a specified number of appointments within a time range. The appointments belong to the currently logged-on user.
Returns: CRMScript.NetServer.NSAppointment[]
It returns only appointments that would be displayed in the user’s diary.
Example:

GetMyPublishedAppointments()

Gets published appointments from the logged in user.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetMySyncAppointments()

Returns a specified number of appointments within a time range. The appointments belong to the currently logged-on user.
Returns: CRMScript.NetServer.NSAppointmentSyncData[] Example:

GetMyTasks(Integer)

Returns a specified number of appointments within a time range. The appointments belong to the currently logged-on user.
Returns: CRMScript.NetServer.NSAppointment[]
It returns only appointments that would be displayed in the user’s task list.
Example:

GetNextSuggestedAppointmentBySale(Integer,Integer,Bool)

Gets the next suggested appointment for a given sale (or rather a given sales guide).
Returns: CRMScript.NetServer.NSSuggestedAppointment Example:

GetOrganizerName(Integer)

Looks up the name / email of an event-organizer
Returns: CRMScript.Global.String Example:

GetPersonAppointments(Integer,Bool,Integer)

Returns a specified number of appointments within a time range. The appointments belong to the person specified.
Returns: CRMScript.NetServer.NSAppointment[]
If the person not is a SuperOffice user (associate) or the logged-on user is not allowed to view this persons appointments an exception is thrown.
Example:

GetPersonAppointmentsByTask(Integer,Bool,Integer,Integer)

Returns a specified number of appointments of a specific appointment task type within a time range. The appointments belong to the person specified.
Returns: CRMScript.NetServer.NSAppointment[]
Task represents the different types of activities, such as Phone call or Meeting.
Example:

GetPersonAppointmentsByTaskHeading(Integer,Bool,Integer,Integer)

Returns a specified number of appointments of a specific appointment task heading within a time range. The appointments belong to the person specified.
Returns: CRMScript.NetServer.NSAppointment[]
Task represents the different types of activities, such as Phone call or Meeting.
Example:

GetPersonAppointmentsByTasks(Integer,Bool,Integer,Integer[])

Returns a specified number of appointments from a list of appointment task types within a time range. The appointments belong to the person specified.
Returns: CRMScript.NetServer.NSAppointment[]
Task represents the different types of activities, such as Phone call or Meeting.
Example:

GetPersonAppointmentsByType(Integer,Bool,Integer,Integer)

Returns a specified number of appointments of a specific appointment type within a time range. The appointments belong to the person specified.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetPersonDiary(Integer,Integer)

Returns a specified number of appointments within a time range.
Returns: CRMScript.NetServer.NSAppointment[]
It only returns appointments that would be displayed in the user’s diary. The appointments belong to the person specified. If the person not is a SuperOffice user (associate) or the logged-on user is not allowed to view this persons appointments an exception is thrown.
Example:

GetPersonTasks(Integer,Integer)

Returns a specified number of appointments within a time range.
Returns: CRMScript.NetServer.NSAppointment[]
It only returns appointments that would be displayed in the user’s task list. The appointments belong to the person specified. If the person not is a SuperOffice user (associate) or the logged-on user is not allowed to view this persons appointments an exception is thrown.
Example:

GetProjectAppointments(Integer,Integer)

Returns a specified number of appointments within a time range. The appointments belong to the project specified.
Returns: CRMScript.NetServer.NSAppointment[]
If the logged-on user is not allowed to view this projects appointments an exception is thrown.
Example:

GetProjectAppointmentsByTask(Integer,Integer,Integer)

Returns a specified number of appointments of a specific appointment task type within a time range. The appointments belong to the project specified.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetProjectAppointmentsByTaskHeading(Integer,Integer,Integer)

Returns a specified number of appointments of a specific appointment task heading within a time range. The appointments belong to the project specified.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetProjectAppointmentsByTasks(Integer,Integer,Integer[])

Returns a specified number of appointments matching the list of appointment task types within a time range. The appointments belong to the project specified.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetProjectAppointmentsByType(Integer,Integer,Integer)

Returns a specified number of appointments of a specific appointment type within a time range. The appointments belong to the project specified.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetProjectMemberAppointments(Integer,Integer)

Returns a specified number of appointments within a time range. The appointments belong to the projects where the person specified is member.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetProjectMemberAppointmentsByTask(Integer,Integer,Integer)

Returns a specified number of appointments of a specific appointment task type within a time range. The appointments belong to the projects where the person specified is member.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetProjectMemberAppointmentsByTaskHeading(Integer,Integer,Integer)

Returns a specified number of appointments of a specific appointment task heading within a time range. The appointments belong to the projects where the person specified is member.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetProjectMemberAppointmentsByTasks(Integer,Integer,Integer[])

Returns a specified number of appointments matching a set of appointment task types within a time range. The appointments belong to the projects where the person specified is member.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetProjectMemberAppointmentsByType(Integer,Integer,Integer)

Returns a specified number of appointments of a specific appointment type within a time range. The appointments belong to the projects where the person specified is member.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetPublishedAppointment(Integer)

Gets published appointment by appointment ID.
Returns: CRMScript.NetServer.NSAppointment Example:

GetPublishedAppointments(Integer[])

Gets published appointments by appointment IDs.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetPublishedProjectAppointments(Integer)

Gets published appointments by project ID.
Returns: CRMScript.NetServer.NSAppointment[] Example:

GetRedLetterInformationListByDatesAndAssociate(Integer)

Gets detailed red-letter day information (red-letter summary + individual day texts) for one or more days according to the given date interval.
Returns: CRMScript.NetServer.NSRedLetterInformationListItem[]
The time portion of the dates is ignored.
Example:

GetSuggestedAppointment(Integer)

Gets an NSSuggestedAppointment object.
Returns: CRMScript.NetServer.NSSuggestedAppointment Example:

GetSuggestedAppointmentEntity(Integer)

Gets an NSSuggestedAppointmentEntity object.
Returns: CRMScript.NetServer.NSSuggestedAppointmentEntity Example:

GetTaskListItem(Integer)

Gets an NSTaskListItem object.
Returns: CRMScript.NetServer.NSTaskListItem Example:

GetTaskListItems(Bool)

Gets all takslist items
Returns: CRMScript.NetServer.NSTaskListItem[] Example:

GetUIDFromAppointmentId(Integer,Bool)

Gets the UID associated with the appointment id in the Invitation table.
Returns: CRMScript.Global.String - The associated UID, or null if none exist. Example:

Move(Integer,Integer)

Moving a booking to another start time.
Returns: CRMScript.NetServer.NSAppointmentEntity
See <xref href=“CRMScript.NetServer.RecurrenceUpdateMode” data-throw-if-not-resolved=“false”></xref>
Example:

Reject(Integer,String,Integer)

Rejecting an appointment invitation
Returns: CRMScript.Global.Void
See <xref href=“CRMScript.NetServer.RecurrenceUpdateMode” data-throw-if-not-resolved=“false”></xref>
Example:

RejectWithEmailConfirmation(Integer,String,Integer)

Rejecting an appointment invitation and send an email confirmation to the meeting organizer.
Returns: CRMScript.Global.Void
See <xref href=“CRMScript.NetServer.RecurrenceUpdateMode” data-throw-if-not-resolved=“false”></xref>
Example:

RejectWithSmtpEmailConfirmation(Integer,String,Integer)

Rejecting an appointment invitation and send an email confirmation to the meeting organizer.
Returns: CRMScript.Global.Void
See <xref href=“CRMScript.NetServer.RecurrenceUpdateMode” data-throw-if-not-resolved=“false”></xref>
Example:

RequestForInfo(Integer,String,String,String,String,String,String,String)

Submits a request for information. The request is added to the task list of the user that is responsible for this contact. Based on wether the person the request is made for is found or not, the following happens: If the person is found, the person, person’s contact and sales representative is returned. If neither the person nor the contact is found a new person and contact is created (if sufficient data is supplied), and the person, person’s contact and sales representative is returned. If the contact and not the person is found a new person is created on this contact, and the contact, salesrep, and person is returned (if there was enough data to return the person). If more than one contact is found a list of contacts is returned.
Returns: CRMScript.NetServer.NSSalesActivity Example:

Save(Integer,Bool)

Saving a booking.
Returns: CRMScript.NetServer.NSAppointmentEntity Example:

SaveAppointmentEntity(NSAppointmentEntity)

Saves an appointmentUpdates the existing NSAppointmentEntity or creates a new NSAppointmentEntity if the ID parameter is 0.
Returns: CRMScript.NetServer.NSAppointmentEntity - The new or updated NSAppointmentEntity. Example:

SaveSuggestedAppointmentEntity(NSSuggestedAppointmentEntity)

Updates the existing NSSuggestedAppointmentEntity or creates a new NSSuggestedAppointmentEntity if the id parameter is 0
Returns: CRMScript.NetServer.NSSuggestedAppointmentEntity - New or updated NSSuggestedAppointmentEntity. Example:

SaveTaskListItem(NSTaskListItem)

Updates the existing NSTaskListItem or creates a new NSTaskListItem if the ID parameter is 0.
Returns: CRMScript.NetServer.NSTaskListItem Example:

SetActivityStatus(String[],Integer)

Sets the completed status for an array of activities. The changes are saved immediately.
Returns: CRMScript.Global.Void
If an invalid ID is passed in (nonexistent record), no changes will be made. If there is no write access to the record being changed, a Sentry exception will be thrown in the usual manner.

SetSeen(Integer,Integer)

Sets an appointment invitation to seen.
Returns: CRMScript.Global.Void

ToggleActivities(String[])

Toggles the completed status for an array of activities.
Returns: CRMScript.Global.Integer Example:

ToggleActivity(String)

Toggles the completed status for an activity. The changes are saved immediately.
Returns: CRMScript.Global.Integer Example:

ToggleAndSetActivities(String[])

Toggles the first activity and sets the rest of the activities to the result of the first toggle.
Returns: CRMScript.Global.String[]
There are some special rules for appointments that trigger a suggested appointment when they are completed. If more than one appointment in the set of identifiers triggers a suggestion, we will not toggle those appointments. This rule is only active when changing the status of an appointment to complete. There must be more than one appointment that triggers such an event for this rule to take effect.
Example:

ToggleAppointmentStatus(Integer)

Sets an appointment’s status to Completed if the appointment had a different status, or sets the status to started if already set to completed.
Returns: CRMScript.Global.Integer Example:

UpdateAppointment(Integer,Integer,Integer,Integer)

Updates an appointment record.
Returns: CRMScript.NetServer.NSAppointment

UpdateAppointmentFromIcsResponse(String)

Updates the attendance to an appointment based on incoming ICS RSVPs.
Returns: CRMScript.Global.Bool Example:

ValidateAppointmentEntity()

Checks that entity is ready for saving.
Returns: CRMScript.Native.Map Example:

ValidateDays()

Validates the set of dates to calculate any conflicts.
Returns: CRMScript.NetServer.NSRecurrenceDate[] Example:

WillSendEmail()

Returns true if the changes will trigger email sending on Save, so you can inform the user.
Returns: CRMScript.Global.Bool - true if the changes will trigger email sending on Save. Example: