Class NSAppointmentAgent
Collection of all services that works with Appointment data.
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSAppointmentAgent()
Collection of all services that works with Appointment data.
Declaration
NSAppointmentAgent Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
Methods
Accept(Integer,Integer)
Accepts an appointment invitation.
Declaration
Void Accept(Integer appointmentId, Integer updateMode) Examples
NSAppointmentAgent agent;
Integer appointmentId;
Integer updateMode;
agent.Accept(appointmentId, updateMode);
Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| Integer | updateMode | See <xref href="CRMScript.NetServer.RecurrenceUpdateMode" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| Void |
AcceptRejected(Integer,Integer)
Accepts that an invited participant has rejected your invitation or assignment.
Declaration
NSAppointmentEntity AcceptRejected(Integer appointmentId, Integer updateMode) Examples
NSAppointmentAgent agent;
Integer appointmentId;
Integer updateMode;
NSAppointmentEntity res = agent.AcceptRejected(appointmentId, updateMode);
Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| Integer | updateMode | See <xref href="CRMScript.NetServer.RecurrenceUpdateMode" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| NSAppointmentEntity |
AcceptWithEmailConfirmation(Integer,Integer)
Accepts an appointment invitation and sends an email confirmation to the meeting organizer.
Declaration
Void AcceptWithEmailConfirmation(Integer appointmentId, Integer updateMode) Examples
NSAppointmentAgent agent;
Integer appointmentId;
Integer updateMode;
agent.AcceptWithEmailConfirmation(appointmentId, updateMode);
Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| Integer | updateMode | See <xref href="CRMScript.NetServer.RecurrenceUpdateMode" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| Void |
AcceptWithSmtpEmailConfirmation(Integer,Integer)
Accepts an appointment invitation and sends an email confirmation to the meeting organizer.
Declaration
Void AcceptWithSmtpEmailConfirmation(Integer appointmentId, Integer updateMode, NSEMailConnectionInfo smtpEMailConnectionInfo) Examples
NSAppointmentAgent agent;
Integer appointmentId;
Integer updateMode;
NSEMailConnectionInfo smtpEMailConnectionInfo;
agent.AcceptWithSmtpEmailConfirmation(appointmentId, updateMode, smtpEMailConnectionInfo);
Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| Integer | updateMode | See <xref href="CRMScript.NetServer.RecurrenceUpdateMode" data-throw-if-not-resolved="false"></xref> |
| smtpEMailConnectionInfo |
Returns
| Type | Description |
| Void |
AssignTo(Integer,Integer)
Assigns an appointment to another person.
Declaration
NSAppointmentEntity AssignTo(Integer appointmentId, ParticipantInfo participant, Integer updateMode) Examples
NSAppointmentAgent agent;
Integer appointmentId;
ParticipantInfo participant;
Integer updateMode;
NSAppointmentEntity res = agent.AssignTo(appointmentId, participant, updateMode);
Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| participant | ||
| Integer | updateMode | See <xref href="CRMScript.NetServer.RecurrenceUpdateMode" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| NSAppointmentEntity | Updated NSAppointmentEntity. |
CalculateDays()
Calculates the set of dates that represents a recurrence pattern. Adds conflict information to each date.
Declaration
NSRecurrenceInfo CalculateDays(NSAppointmentEntity appointmentEntity) Parameters
| Type | Name | Description |
| NSAppointmentEntity | appointmentEntity |
Returns
| Type | Description |
| NSRecurrenceInfo |
CanAssignToProjectMember(Integer,Integer)
Declaration
Bool CanAssignToProjectMember(Integer projectId, Integer suggestedAppointmentId) Parameters
| Type | Name | Description |
| Integer | projectId | |
| Integer | suggestedAppointmentId |
Returns
| Type | Description |
| Bool |
CleanUpBookingDeleted(Integer[])
Deletes all appointments(within the appointmentIds array) with status BookingDeleted.
Declaration
Integer CleanUpBookingDeleted(Integer[] appointmentIds) Parameters
| Type | Name | Description |
| Integer[] | appointmentIds |
Returns
| Type | Description |
| Integer |
CleanUpRecurringBookingDeleted()
Deletes all appointments with status BookingDeleted and for logged-in user.
Declaration
Integer CleanUpRecurringBookingDeleted() Returns
| Type | Description |
| Integer |
CreateAndAccept(Integer,Integer)
Creates an appointment from an emailItem invitation and accepting it.
Declaration
Void CreateAndAccept(Integer emailItemId, Integer updateMode) Parameters
| Type | Name | Description |
| Integer | emailItemId | |
| Integer | updateMode | See <xref href="CRMScript.NetServer.RecurrenceUpdateMode" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| Void |
CreateAndAcceptWithEmailConfirmation(Integer,Integer)
Creates an appointment from an emailItem invitation and accepting it with email confirmation to the meeting organizer.
Declaration
Void CreateAndAcceptWithEmailConfirmation(Integer emailItemId, Integer updateMode) Parameters
| Type | Name | Description |
| Integer | emailItemId | |
| Integer | updateMode | See <xref href="CRMScript.NetServer.RecurrenceUpdateMode" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| Void |
CreateAppointmentForUID(String)
Creates an invitation record and an appointment with a given UID to reserve it if the UID is unused, otherwise null.
Declaration
NSAppointmentEntity CreateAppointmentForUID(NSAppointmentEntity appointmentEntity, String uID) Examples
NSAppointmentAgent agent;
NSAppointmentEntity appointmentEntity;
String uID;
NSAppointmentEntity res = agent.CreateAppointmentForUID(appointmentEntity, uID);
Parameters
| Type | Name | Description |
| NSAppointmentEntity | appointmentEntity | |
| String | uID |
Returns
| Type | Description |
| NSAppointmentEntity | The newly created NSAppointmentEntity or null if the UID is in the DB already. |
CreateDefaultAppointmentEntity()
Sets default values into a new NSAppointmentEntity.
Declaration
NSAppointmentEntity CreateDefaultAppointmentEntity() Examples
NSAppointmentAgent agent;
NSAppointmentEntity thing = agent.CreateDefaultAppointmentEntity();
thing = agent.SaveAppointmentEntity(thing);
Returns
| Type | Description |
| NSAppointmentEntity | A new NSAppointmentEntity with default values. |
CreateDefaultAppointmentEntityByType(Integer)
Creates an NSAppointmentEntity populated with the default values for the specific type.
Declaration
NSAppointmentEntity CreateDefaultAppointmentEntityByType(Integer type) Examples
NSAppointmentAgent agent;
Integer type;
NSAppointmentEntity res = agent.CreateDefaultAppointmentEntityByType(type);
Parameters
| Type | Name | Description |
| Integer | type | See <xref href="CRMScript.NetServer.TaskType" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| NSAppointmentEntity |
CreateDefaultAppointmentEntityByTypeAndAssociate(Integer,Integer)
Creates an NSAppointmentEntity populated with the default values for the specific type and owner.
Declaration
NSAppointmentEntity CreateDefaultAppointmentEntityByTypeAndAssociate(Integer type, Integer associateId) Examples
NSAppointmentAgent agent;
Integer type;
Integer associateId;
NSAppointmentEntity res = agent.CreateDefaultAppointmentEntityByTypeAndAssociate(type, associateId);
Parameters
| Type | Name | Description |
| Integer | type | See <xref href="CRMScript.NetServer.TaskType" data-throw-if-not-resolved="false"></xref> |
| Integer | associateId |
Returns
| Type | Description |
| NSAppointmentEntity |
CreateDefaultAppointmentEntityFromProjectSuggestion(Integer,Integer,Bool,Integer)
Declaration
NSAppointmentEntity CreateDefaultAppointmentEntityFromProjectSuggestion(Integer suggestedAppointmentId, Integer projectId, Bool createNow, Integer ownerId) Parameters
| Type | Name | Description |
| Integer | suggestedAppointmentId | |
| Integer | projectId | |
| Bool | createNow | |
| Integer | ownerId |
Returns
| Type | Description |
| NSAppointmentEntity |
CreateDefaultAppointmentEntityFromSaleSuggestion(Integer,Integer,Bool,Integer)
Creates an appointment based on a suggested appointment.
Declaration
NSAppointmentEntity CreateDefaultAppointmentEntityFromSaleSuggestion(Integer suggestedAppointmentId, Integer saleId, Bool createNow, Integer ownerId) Examples
NSAppointmentAgent agent;
Integer suggestedAppointmentId;
Integer saleId;
Bool createNow;
Integer ownerId;
NSAppointmentEntity res = agent.CreateDefaultAppointmentEntityFromSaleSuggestion(suggestedAppointmentId, saleId, createNow, ownerId);
Parameters
| Type | Name | Description |
| Integer | suggestedAppointmentId | |
| Integer | saleId | |
| Bool | createNow | |
| Integer | ownerId |
Returns
| Type | Description |
| NSAppointmentEntity | The newly created appointment. |
CreateDefaultRecurrence()
Creates an NSRecurrenceInfo object populated with the default values for the specific type.
Declaration
NSRecurrenceInfo CreateDefaultRecurrence() Examples
NSAppointmentAgent agent;
NSRecurrenceInfo res = agent.CreateDefaultRecurrence();
Returns
| Type | Description |
| NSRecurrenceInfo |
CreateDefaultRecurrenceByDate()
Creates an NSRecurrenceInfo object populated with the default values for the specific type.
Declaration
NSRecurrenceInfo CreateDefaultRecurrenceByDate(DateTime startDate) Parameters
| Type | Name | Description |
| startDate | The start date for the recurrence pattern. |
Returns
| Type | Description |
| 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.
Declaration
NSAppointmentEntity CreateDefaultReOpenAppointment(Integer saleId) Examples
NSAppointmentAgent agent;
Integer saleId;
NSAppointmentEntity res = agent.CreateDefaultReOpenAppointment(saleId);
Parameters
| Type | Name | Description |
| Integer | saleId |
Returns
| Type | Description |
| NSAppointmentEntity |
CreateDefaultSuggestedAppointmentEntity()
Sets default values into a new NSSuggestedAppointmentEntity.
Declaration
NSSuggestedAppointmentEntity CreateDefaultSuggestedAppointmentEntity() Examples
NSAppointmentAgent agent;
NSSuggestedAppointmentEntity thing = agent.CreateDefaultSuggestedAppointmentEntity();
thing = agent.SaveSuggestedAppointmentEntity(thing);
Returns
| Type | Description |
| NSSuggestedAppointmentEntity | A new NSSuggestedAppointmentEntity with default values. |
CreateDefaultTaskListItem()
Sets default values into a new NSTaskListItem.
Declaration
NSTaskListItem CreateDefaultTaskListItem() Examples
NSAppointmentAgent agent;
NSTaskListItem thing = agent.CreateDefaultTaskListItem();
thing = agent.SaveTaskListItem(thing);
Returns
| Type | Description |
| NSTaskListItem | A new NSTaskListItem with default values. |
DeclineInvitationFromEmailItem(Integer,String)
Declining an appointment invitation where no tentative appointments have been created.
Declaration
Void DeclineInvitationFromEmailItem(Integer emailItemId, String rejectReason) Parameters
| Type | Name | Description |
| Integer | emailItemId | |
| String | rejectReason |
Returns
| Type | Description |
| Void |
Delete(Integer,Integer,Bool)
Deletes a booking
Declaration
Void Delete(Integer appointmentId, Integer updateMode, Bool sendEmailToParticipants, NSEMailConnectionInfo smtpEMailConnectionInfo, NSEMailConnectionInfo imapEMailConnectionInfo) Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| Integer | updateMode | See <xref href="CRMScript.NetServer.RecurrenceUpdateMode" data-throw-if-not-resolved="false"></xref> |
| Bool | sendEmailToParticipants | |
| smtpEMailConnectionInfo | ||
| imapEMailConnectionInfo |
Returns
| Type | Description |
| Void |
DeleteAppointmentEntity(Integer)
Deletes the NSAppointmentEntity.
Declaration
Void DeleteAppointmentEntity(Integer appointmentEntity) Examples
NSAppointmentAgent agent;
agent.DeleteAppointmentEntity(123);
Parameters
| Type | Name | Description |
| Integer | appointmentEntity |
Returns
| Type | Description |
| Void |
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).
Declaration
NSSalesActivity GenerateLead(Integer associateIdForNewContact, String leadDescription, String relation, Integer relationId, String leadContact, String leadPersonFirstname, String leadPersonLastname, String leadPersonEmail, String leadPhoneNumber, String creatorsContact, String creatorsFirstname, String creatorsLastname) Examples
NSAppointmentAgent agent;
Integer associateIdForNewContact;
String leadDescription;
String relation;
Integer relationId;
String leadContact;
String leadPersonFirstname;
String leadPersonLastname;
String leadPersonEmail;
String leadPhoneNumber;
String creatorsContact;
String creatorsFirstname;
String creatorsLastname;
NSSalesActivity res = agent.GenerateLead(associateIdForNewContact, leadDescription, relation, relationId, leadContact, leadPersonFirstname, leadPersonLastname, leadPersonEmail, leadPhoneNumber, creatorsContact, creatorsFirstname, creatorsLastname);
Parameters
| Type | Name | Description |
| Integer | associateIdForNewContact | |
| String | leadDescription | |
| String | relation | |
| Integer | relationId | |
| String | leadContact | |
| String | leadPersonFirstname | |
| String | leadPersonLastname | |
| String | leadPersonEmail | |
| String | leadPhoneNumber | |
| String | creatorsContact | |
| String | creatorsFirstname | |
| String | creatorsLastname |
Returns
| Type | Description |
| NSSalesActivity |
GetActivityInformationListByDatesAndAssociate(Integer)
Gets activity information for one or more days according to the given date interval.
Declaration
NSActivityInformationListItem[] GetActivityInformationListByDatesAndAssociate(DateTime startDate, DateTime endDate, Integer associateId) Examples
NSAppointmentAgent agent;
DateTime startDate;
DateTime endDate;
Integer associateId;
NSActivityInformationListItem[] res = agent.GetActivityInformationListByDatesAndAssociate(startDate, endDate, associateId);
Parameters
| Type | Name | Description |
| startDate | ||
| endDate | ||
| Integer | associateId |
Returns
| Type | Description |
| NSActivityInformationListItem[] |
GetAlarms(Bool,Bool,Integer)
Declaration
NSMultiAlarmData GetAlarms(Bool includeInvitations, Bool includeAllAppointments, Integer defaultAlarmLeadTimeInMinutes) Parameters
| Type | Name | Description |
| Bool | includeInvitations | |
| Bool | includeAllAppointments | |
| Integer | defaultAlarmLeadTimeInMinutes |
Returns
| Type | Description |
| NSMultiAlarmData |
GetAppointment(Integer)
Gets an NSAppointment object.
Declaration
NSAppointment GetAppointment(Integer appointmentId) Examples
NSAppointmentAgent agent;
NSAppointment thing = agent.GetAppointment(123);
Parameters
| Type | Name | Description |
| Integer | appointmentId |
Returns
| Type | Description |
| NSAppointment |
GetAppointmentEntity(Integer)
Gets an NSAppointmentEntity object.
Declaration
NSAppointmentEntity GetAppointmentEntity(Integer appointmentEntityId) Examples
NSAppointmentAgent agent;
NSAppointmentEntity thing = agent.GetAppointmentEntity(123);
Parameters
| Type | Name | Description |
| Integer | appointmentEntityId |
Returns
| Type | Description |
| NSAppointmentEntity |
GetAppointmentFromUID(String)
Gets the appointment that corresponds to the given UID.
Declaration
NSAppointmentEntity GetAppointmentFromUID(String uID) Examples
NSAppointmentAgent agent;
String uID;
NSAppointmentEntity res = agent.GetAppointmentFromUID(uID);
Parameters
| Type | Name | Description |
| String | uID |
Returns
| Type | Description |
| NSAppointmentEntity | Appointment corresponding to uId. |
GetAppointmentHaveParticipantsWithEmail(Integer)
Checks if any of the participants is marked to receive emails on this appointment.
Declaration
Bool GetAppointmentHaveParticipantsWithEmail(Integer appointmentId) Examples
NSAppointmentAgent agent;
Integer appointmentId;
Bool res = agent.GetAppointmentHaveParticipantsWithEmail(appointmentId);
Parameters
| Type | Name | Description |
| Integer | appointmentId |
Returns
| Type | Description |
| Bool | False if no participants are defined. |
GetAppointmentList(Integer[])
Retrieves an array of NSAppointment objects.
Declaration
NSAppointment[] GetAppointmentList() Examples
Integer[] ids;
NSAppointmentAgent agent;
agent.GetAppointmentList(ids);
Parameters
| Type | Name | Description |
| Integer[] | appointmentIds | The identifiers of the appointments. |
Returns
| Type | Description |
| NSAppointment[] |
GetAppointmentRecords(Integer,Integer)
Gets all records involved in a booking and/or recurring appointments.
Declaration
NSAppointment[] GetAppointmentRecords(Integer motherId, Integer recurrenceRuleId) Parameters
| Type | Name | Description |
| Integer | motherId | can be zero for repeating appointments or bookings |
| Integer | recurrenceRuleId | can be zero for bookings that are not repeating. |
Returns
| Type | Description |
| NSAppointment[] |
GetAppointmentsByTaskHeading(Integer)
Returns appointments of a specific appointment task heading.
Declaration
NSAppointment[] GetAppointmentsByTaskHeading(Integer taskHeadingId) Examples
NSAppointmentAgent agent;
Integer taskHeadingId;
NSAppointment[] res = agent.GetAppointmentsByTaskHeading(taskHeadingId);
Parameters
| Type | Name | Description |
| Integer | taskHeadingId | The heading represents a grouping or filtering of tasks. |
Returns
| Type | Description |
| NSAppointment[] |
GetAssociateDiary(Integer,Integer)
Declaration
NSAppointment[] GetAssociateDiary(Integer associateId, DateTime startTime, DateTime endTime, Integer count) Parameters
| Type | Name | Description |
| Integer | associateId | |
| startTime | ||
| endTime | ||
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
GetAssociatesDiary(Integer[])
Declaration
NSAppointment[] GetAssociatesDiary(Integer[] associateIds, DateTime startTime, DateTime endTime) Parameters
| Type | Name | Description |
| Integer[] | associateIds | |
| startTime | ||
| endTime |
Returns
| Type | Description |
| NSAppointment[] |
GetCanInsertForAssociates(Integer[])
Checks if the current associate can create appointments in the diary of other associates.
Declaration
Bool[] GetCanInsertForAssociates(Integer[] associateIds) Examples
NSAppointmentAgent agent;
Integer[] associateIds;
Bool[] res = agent.GetCanInsertForAssociates(associateIds);
Parameters
| Type | Name | Description |
| Integer[] | associateIds | Array of associate IDs to check for. |
Returns
| Type | Description |
| Bool[] | An array of Bool corresponding to the associate array input parameter. |
GetContactAppointments(Integer,Integer)
Returns a specified number of appointments within a time range. The appointments belong to the contact specified.
Declaration
NSAppointment[] GetContactAppointments(Integer contactId, DateTime startTime, DateTime endTime, Integer count) Examples
NSAppointmentAgent agent;
Integer contactId;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetContactAppointments(contactId, startTime, endTime, count);
Parameters
| Type | Name | Description |
| Integer | contactId | |
| startTime | ||
| endTime | ||
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetContactAppointmentsByTask(Integer contactId, DateTime startTime, DateTime endTime, Integer count, Integer taskId) Examples
NSAppointmentAgent agent;
Integer contactId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskId;
NSAppointment[] res = agent.GetContactAppointmentsByTask(contactId, startTime, endTime, count, taskId);
Parameters
| Type | Name | Description |
| Integer | contactId | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer | taskId |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetContactAppointmentsByTaskHeading(Integer contactId, DateTime startTime, DateTime endTime, Integer count, Integer taskHeadingId) Examples
NSAppointmentAgent agent;
Integer contactId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskHeadingId;
NSAppointment[] res = agent.GetContactAppointmentsByTaskHeading(contactId, startTime, endTime, count, taskHeadingId);
Parameters
| Type | Name | Description |
| Integer | contactId | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer | taskHeadingId | The heading represents a grouping or filtering of tasks. |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetContactAppointmentsByTasks(Integer contactId, DateTime startTime, DateTime endTime, Integer count, Integer[] taskIds) Examples
NSAppointmentAgent agent;
Integer contactId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer[] taskIds;
NSAppointment[] res = agent.GetContactAppointmentsByTasks(contactId, startTime, endTime, count, taskIds);
Parameters
| Type | Name | Description |
| Integer | contactId | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer[] | taskIds |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetContactAppointmentsByType(Integer contactId, DateTime startTime, DateTime endTime, Integer count, Integer appointmentType) Examples
NSAppointmentAgent agent;
Integer contactId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer appointmentType;
NSAppointment[] res = agent.GetContactAppointmentsByType(contactId, startTime, endTime, count, appointmentType);
Parameters
| Type | Name | Description |
| Integer | contactId | |
| Integer | count | |
| Integer | appointmentType | See <xref href="CRMScript.NetServer.AppointmentType" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| NSAppointment[] |
GetDayInformationListByDatesAndAssociate(Integer)
Gets combined day information (activity + red-letter summary) for one or more days according to the given date interval.
Declaration
NSDayInformationListItem[] GetDayInformationListByDatesAndAssociate(DateTime startDate, DateTime endDate, Integer associateId) Examples
NSAppointmentAgent agent;
DateTime startDate;
DateTime endDate;
Integer associateId;
NSDayInformationListItem[] res = agent.GetDayInformationListByDatesAndAssociate(startDate, endDate, associateId);
Parameters
| Type | Name | Description |
| startTime | ||
| endTime | ||
| Integer | associateId |
Returns
| Type | Description |
| NSDayInformationListItem[] |
GetDiaryByGroup(Integer,Integer,Integer)
Declaration
NSAppointment[] GetDiaryByGroup(Integer groupId, Integer groupType, DateTime startTime, DateTime endTime, Integer count) Parameters
| Type | Name | Description |
| Integer | groupId | |
| Integer | groupType | |
| startTime | ||
| endTime | ||
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
GetMyAppointments(Integer)
Returns a specified number of appointments within a time range. The appointments belong to the currently logged-on user.
Declaration
NSAppointment[] GetMyAppointments(DateTime startTime, DateTime endTime, Integer count) Examples
NSAppointmentAgent agent;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetMyAppointments(startTime, endTime, count);
Parameters
| Type | Name | Description |
| startTime | ||
| endTime | ||
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
GetMyDiary(Integer)
Returns a specified number of appointments within a time range. The appointments belong to the currently logged-on user.
Declaration
NSAppointment[] GetMyDiary(DateTime startTime, DateTime endTime, Integer count) Examples
NSAppointmentAgent agent;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetMyDiary(startTime, endTime, count);
Parameters
| Type | Name | Description |
| startTime | ||
| endTime | ||
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
GetMyPublishedAppointments()
Gets published appointments from the logged in user.
Declaration
NSAppointment[] GetMyPublishedAppointments() Examples
NSAppointmentAgent agent;
NSAppointment[] res = agent.GetMyPublishedAppointments();
Returns
| Type | Description |
| NSAppointment[] |
GetMySyncAppointments()
Returns a specified number of appointments within a time range. The appointments belong to the currently logged-on user.
Declaration
NSAppointmentSyncData[] GetMySyncAppointments(DateTime startTime, DateTime endTime) Examples
NSAppointmentAgent agent;
DateTime startTime;
DateTime endTime;
NSAppointmentSyncData[] res = agent.GetMySyncAppointments(startTime, endTime);
Parameters
| Type | Name | Description |
| startTime | ||
| endTime |
Returns
| Type | Description |
| NSAppointmentSyncData[] |
GetMyTasks(Integer)
Returns a specified number of appointments within a time range. The appointments belong to the currently logged-on user.
Declaration
NSAppointment[] GetMyTasks(Integer count) Examples
NSAppointmentAgent agent;
Integer count;
NSAppointment[] res = agent.GetMyTasks(count);
Parameters
| Type | Name | Description |
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
GetNextSuggestedAppointmentBySale(Integer,Integer,Bool)
Gets the next suggested appointment for a given sale (or rather a given sales guide).
Declaration
NSSuggestedAppointment GetNextSuggestedAppointmentBySale(Integer saleId, Integer currentAppointmentId, Bool skipCompleteCheck) Examples
NSAppointmentAgent agent;
Integer saleId;
Integer currentAppointmentId;
Bool skipCompleteCheck;
NSSuggestedAppointment res = agent.GetNextSuggestedAppointmentBySale(saleId, currentAppointmentId, skipCompleteCheck);
Parameters
| Type | Name | Description |
| Integer | saleId | |
| Integer | currentAppointmentId | |
| Bool | skipCompleteCheck |
Returns
| Type | Description |
| NSSuggestedAppointment |
GetOrganizerName(Integer)
Looks up the name / email of an event-organizer
Declaration
String GetOrganizerName(Integer motherAppointmentId) Examples
NSAppointmentAgent agent;
Integer motherAppointmentId;
String res = agent.GetOrganizerName(motherAppointmentId);
Parameters
| Type | Name | Description |
| Integer | motherAppointmentId |
Returns
| Type | Description |
| String |
GetPersonAppointments(Integer,Bool,Integer)
Returns a specified number of appointments within a time range. The appointments belong to the person specified.
Declaration
NSAppointment[] GetPersonAppointments(Integer personId, Bool includeProjectAppointments, DateTime startTime, DateTime endTime, Integer count) Examples
NSAppointmentAgent agent;
Integer personId;
Bool includeProjectAppointments;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetPersonAppointments(personId, includeProjectAppointments, startTime, endTime, count);
Parameters
| Type | Name | Description |
| Integer | personId | |
| Bool | includeProjectAppointments | |
| startTime | ||
| endTime | ||
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetPersonAppointmentsByTask(Integer personId, Bool includeProjectAppointments, DateTime startTime, DateTime endTime, Integer count, Integer taskId) Examples
NSAppointmentAgent agent;
Integer personId;
Bool includeProjectAppointments;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskId;
NSAppointment[] res = agent.GetPersonAppointmentsByTask(personId, includeProjectAppointments, startTime, endTime, count, taskId);
Parameters
| Type | Name | Description |
| Integer | personId | |
| Bool | includeProjectAppointments | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer | taskId |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetPersonAppointmentsByTaskHeading(Integer personId, Bool includeProjectAppointments, DateTime startTime, DateTime endTime, Integer count, Integer taskHeadingId) Examples
NSAppointmentAgent agent;
Integer personId;
Bool includeProjectAppointments;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskHeadingId;
NSAppointment[] res = agent.GetPersonAppointmentsByTaskHeading(personId, includeProjectAppointments, startTime, endTime, count, taskHeadingId);
Parameters
| Type | Name | Description |
| Integer | personId | |
| Bool | includeProjectAppointments | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer | taskHeadingId | The heading represents a grouping or filtering of tasks. |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetPersonAppointmentsByTasks(Integer personId, Bool includeProjectAppointments, DateTime startTime, DateTime endTime, Integer count, Integer[] taskIds) Examples
NSAppointmentAgent agent;
Integer personId;
Bool includeProjectAppointments;
DateTime startTime;
DateTime endTime;
Integer count;
Integer[] taskIds;
NSAppointment[] res = agent.GetPersonAppointmentsByTasks(personId, includeProjectAppointments, startTime, endTime, count, taskIds);
Parameters
| Type | Name | Description |
| Integer | personId | |
| Bool | includeProjectAppointments | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer[] | taskIds |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetPersonAppointmentsByType(Integer personId, Bool includeProjectAppointments, DateTime startTime, DateTime endTime, Integer count, Integer appointmentType) Examples
NSAppointmentAgent agent;
Integer personId;
Bool includeProjectAppointments;
DateTime startTime;
DateTime endTime;
Integer count;
Integer appointmentType;
NSAppointment[] res = agent.GetPersonAppointmentsByType(personId, includeProjectAppointments, startTime, endTime, count, appointmentType);
Parameters
| Type | Name | Description |
| Integer | personId | |
| Bool | includeProjectAppointments | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer | appointmentType | See <xref href="CRMScript.NetServer.AppointmentType" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| NSAppointment[] |
GetPersonDiary(Integer,Integer)
Returns a specified number of appointments within a time range.
Declaration
NSAppointment[] GetPersonDiary(Integer personId, DateTime startTime, DateTime endTime, Integer count) Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetPersonDiary(personId, startTime, endTime, count);
Parameters
| Type | Name | Description |
| Integer | personId | |
| startTime | ||
| endTime | ||
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
GetPersonTasks(Integer,Integer)
Returns a specified number of appointments within a time range.
Declaration
NSAppointment[] GetPersonTasks(Integer personId, Integer count) Examples
NSAppointmentAgent agent;
Integer personId;
Integer count;
NSAppointment[] res = agent.GetPersonTasks(personId, count);
Parameters
| Type | Name | Description |
| Integer | personId | |
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
GetProjectAppointments(Integer,Integer)
Returns a specified number of appointments within a time range. The appointments belong to the project specified.
Declaration
NSAppointment[] GetProjectAppointments(Integer projectId, DateTime startTime, DateTime endTime, Integer count) Examples
NSAppointmentAgent agent;
Integer projectId;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetProjectAppointments(projectId, startTime, endTime, count);
Parameters
| Type | Name | Description |
| Integer | projectId | |
| startTime | ||
| endTime | ||
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetProjectAppointmentsByTask(Integer projectId, DateTime startTime, DateTime endTime, Integer count, Integer taskId) Examples
NSAppointmentAgent agent;
Integer projectId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskId;
NSAppointment[] res = agent.GetProjectAppointmentsByTask(projectId, startTime, endTime, count, taskId);
Parameters
| Type | Name | Description |
| Integer | projectId | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer | taskId | The different types of activities, such as Phone call or Meeting. |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetProjectAppointmentsByTaskHeading(Integer projectId, DateTime startTime, DateTime endTime, Integer count, Integer taskHeadingId) Examples
NSAppointmentAgent agent;
Integer projectId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskHeadingId;
NSAppointment[] res = agent.GetProjectAppointmentsByTaskHeading(projectId, startTime, endTime, count, taskHeadingId);
Parameters
| Type | Name | Description |
| Integer | projectId | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer | taskHeadingId | The heading represents a grouping or filtering of tasks. |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetProjectAppointmentsByTasks(Integer projectId, DateTime startTime, DateTime endTime, Integer count, Integer[] taskIds) Examples
NSAppointmentAgent agent;
Integer projectId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer[] taskIds;
NSAppointment[] res = agent.GetProjectAppointmentsByTasks(projectId, startTime, endTime, count, taskIds);
Parameters
| Type | Name | Description |
| Integer | projectId | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer[] | taskIds |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetProjectAppointmentsByType(Integer projectId, DateTime startTime, DateTime endTime, Integer count, Integer appointmentType) Examples
NSAppointmentAgent agent;
Integer projectId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer appointmentType;
NSAppointment[] res = agent.GetProjectAppointmentsByType(projectId, startTime, endTime, count, appointmentType);
Parameters
| Type | Name | Description |
| Integer | projectId | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer | appointmentType | See <xref href="CRMScript.NetServer.AppointmentType" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetProjectMemberAppointments(Integer personId, DateTime startTime, DateTime endTime, Integer count) Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetProjectMemberAppointments(personId, startTime, endTime, count);
Parameters
| Type | Name | Description |
| Integer | personId | |
| startTime | ||
| endTime | ||
| Integer | count |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetProjectMemberAppointmentsByTask(Integer personId, DateTime startTime, DateTime endTime, Integer count, Integer taskId) Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskId;
NSAppointment[] res = agent.GetProjectMemberAppointmentsByTask(personId, startTime, endTime, count, taskId);
Parameters
| Type | Name | Description |
| Integer | personId | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer | taskId |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetProjectMemberAppointmentsByTaskHeading(Integer personId, DateTime startTime, DateTime endTime, Integer count, Integer taskHeadingId) Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskHeadingId;
NSAppointment[] res = agent.GetProjectMemberAppointmentsByTaskHeading(personId, startTime, endTime, count, taskHeadingId);
Parameters
| Type | Name | Description |
| Integer | personId | |
| Integer | count | |
| Integer | taskHeadingId | The heading represents a grouping or filtering of tasks. |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetProjectMemberAppointmentsByTasks(Integer personId, DateTime startTime, DateTime endTime, Integer count, Integer[] taskIds) Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer[] taskIds;
NSAppointment[] res = agent.GetProjectMemberAppointmentsByTasks(personId, startTime, endTime, count, taskIds);
Parameters
| Type | Name | Description |
| Integer | personId | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer[] | taskIds |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSAppointment[] GetProjectMemberAppointmentsByType(Integer personId, DateTime startTime, DateTime endTime, Integer count, Integer appointmentType) Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer appointmentType;
NSAppointment[] res = agent.GetProjectMemberAppointmentsByType(personId, startTime, endTime, count, appointmentType);
Parameters
| Type | Name | Description |
| Integer | personId | |
| startTime | ||
| endTime | ||
| Integer | count | |
| Integer | appointmentType | See <xref href="CRMScript.NetServer.AppointmentType" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| NSAppointment[] |
GetPublishedAppointment(Integer)
Gets published appointment by appointment ID.
Declaration
NSAppointment GetPublishedAppointment(Integer appointmentId) Examples
NSAppointmentAgent agent;
Integer appointmentId;
NSAppointment res = agent.GetPublishedAppointment(appointmentId);
Parameters
| Type | Name | Description |
| Integer | appointmentId |
Returns
| Type | Description |
| NSAppointment |
GetPublishedAppointments(Integer[])
Gets published appointments by appointment IDs.
Declaration
NSAppointment[] GetPublishedAppointments(Integer[] appointmentIds) Examples
NSAppointmentAgent agent;
Integer[] appointmentIds;
NSAppointment[] res = agent.GetPublishedAppointments(appointmentIds);
Parameters
| Type | Name | Description |
| Integer[] | appointmentIds |
Returns
| Type | Description |
| NSAppointment[] |
GetPublishedProjectAppointments(Integer)
Gets published appointments by project ID.
Declaration
NSAppointment[] GetPublishedProjectAppointments(Integer projectId) Examples
NSAppointmentAgent agent;
Integer projectId;
NSAppointment[] res = agent.GetPublishedProjectAppointments(projectId);
Parameters
| Type | Name | Description |
| Integer | projectId |
Returns
| Type | Description |
| NSAppointment[] |
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.
Declaration
NSRedLetterInformationListItem[] GetRedLetterInformationListByDatesAndAssociate(DateTime startDate, DateTime endDate, Integer associateId) Examples
NSAppointmentAgent agent;
DateTime startDate;
DateTime endDate;
Integer associateId;
NSRedLetterInformationListItem[] res = agent.GetRedLetterInformationListByDatesAndAssociate(startDate, endDate, associateId);
Parameters
| Type | Name | Description |
| startTime | ||
| endTime | ||
| Integer | associateId |
Returns
| Type | Description |
| NSRedLetterInformationListItem[] |
GetSuggestedAppointment(Integer)
Gets an NSSuggestedAppointment object.
Declaration
NSSuggestedAppointment GetSuggestedAppointment(Integer suggestedAppointmentId) Examples
NSAppointmentAgent agent;
NSSuggestedAppointment thing = agent.GetSuggestedAppointment(123);
Parameters
| Type | Name | Description |
| Integer | suggestedAppointmentId |
Returns
| Type | Description |
| NSSuggestedAppointment |
GetSuggestedAppointmentEntity(Integer)
Gets an NSSuggestedAppointmentEntity object.
Declaration
NSSuggestedAppointmentEntity GetSuggestedAppointmentEntity(Integer suggestedAppointmentEntityId) Examples
NSAppointmentAgent agent;
NSSuggestedAppointmentEntity thing = agent.GetSuggestedAppointmentEntity(123);
Parameters
| Type | Name | Description |
| Integer | suggestedAppointmentEntityId |
Returns
| Type | Description |
| NSSuggestedAppointmentEntity |
GetTaskListItem(Integer)
Gets an NSTaskListItem object.
Declaration
NSTaskListItem GetTaskListItem(Integer taskListItemId) Examples
NSAppointmentAgent agent;
NSTaskListItem thing = agent.GetTaskListItem(123);
Parameters
| Type | Name | Description |
| Integer | taskListItemId |
Returns
| Type | Description |
| NSTaskListItem |
GetTaskListItems(Bool)
Gets all takslist items
Declaration
NSTaskListItem[] GetTaskListItems(Bool includeDeleted) Examples
NSAppointmentAgent agent;
Bool includeDeleted;
NSTaskListItem[] res = agent.GetTaskListItems(includeDeleted);
Parameters
| Type | Name | Description |
| Bool | includeDeleted |
Returns
| Type | Description |
| NSTaskListItem[] |
GetUIDFromAppointmentId(Integer,Bool)
Gets the UID associated with the appointment id in the Invitation table.
Declaration
String GetUIDFromAppointmentId(Integer appointmentId, Bool useMotherId) Examples
NSAppointmentAgent agent;
Integer appointmentId;
Bool useMotherId;
String res = agent.GetUIDFromAppointmentId(appointmentId, useMotherId);
Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| Bool | useMotherId |
Returns
| Type | Description |
| String | The associated UID, or null if none exist. |
Move(Integer,Integer)
Moving a booking to another start time.
Declaration
NSAppointmentEntity Move(Integer appointmentId, DateTime newStartTime, Integer updateMode) Examples
NSAppointmentAgent agent;
Integer appointmentId;
DateTime newStartTime;
Integer updateMode;
NSAppointmentEntity res = agent.Move(appointmentId, newStartTime, updateMode);
Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| Integer | updateMode |
Returns
| Type | Description |
| NSAppointmentEntity |
Reject(Integer,String,Integer)
Rejecting an appointment invitation
Declaration
Void Reject(Integer appointmentId, String rejectReason, Integer updateMode) Examples
NSAppointmentAgent agent;
Integer appointmentId;
String rejectReason;
Integer updateMode;
agent.Reject(appointmentId, rejectReason, updateMode);
Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| String | rejectReason | |
| Integer | updateMode |
Returns
| Type | Description |
| Void |
RejectWithEmailConfirmation(Integer,String,Integer)
Rejecting an appointment invitation and send an email confirmation to the meeting organizer.
Declaration
Void RejectWithEmailConfirmation(Integer appointmentId, String rejectReason, Integer updateMode) Examples
NSAppointmentAgent agent;
Integer appointmentId;
String rejectReason;
Integer updateMode;
agent.RejectWithEmailConfirmation(appointmentId, rejectReason, updateMode);
Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| String | rejectReason | |
| Integer | updateMode |
Returns
| Type | Description |
| Void |
RejectWithSmtpEmailConfirmation(Integer,String,Integer)
Rejecting an appointment invitation and send an email confirmation to the meeting organizer.
Declaration
Void RejectWithSmtpEmailConfirmation(Integer appointmentId, String rejectReason, Integer updateMode, NSEMailConnectionInfo smtpEMailConnectionInfo) Examples
NSAppointmentAgent agent;
Integer appointmentId;
String rejectReason;
Integer updateMode;
NSEMailConnectionInfo smtpEMailConnectionInfo;
agent.RejectWithSmtpEmailConfirmation(appointmentId, rejectReason, updateMode, smtpEMailConnectionInfo);
Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| String | rejectReason | |
| Integer | updateMode |
Returns
| Type | Description |
| Void |
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.
Declaration
NSSalesActivity RequestForInfo(Integer associateIdForNewContact, String channel, String regarding, String contactName, String personFirstname, String personLastname, String emailAddress, String phoneNumber) Examples
NSAppointmentAgent agent;
Integer associateIdForNewContact;
String channel;
String regarding;
String contactName;
String personFirstname;
String personLastname;
String emailAddress;
String phoneNumber;
NSSalesActivity res = agent.RequestForInfo(associateIdForNewContact, channel, regarding, contactName, personFirstname, personLastname, emailAddress, phoneNumber);
Parameters
| Type | Name | Description |
| Integer | associateIdForNewContact | |
| String | channel | |
| String | regarding | |
| String | contactName | |
| String | personFirstname | |
| String | personLastname | |
| String | emailAddress | |
| String | phoneNumber |
Returns
| Type | Description |
| NSSalesActivity |
Save(Integer,Bool)
Saving a booking.
Declaration
NSAppointmentEntity Save(NSAppointmentEntity appointmentEntity, Integer updateMode, Bool sendEmailToParticipants, NSEMailConnectionInfo smtpEMailConnectionInfo, NSEMailConnectionInfo imapEMailConnectionInfo) Examples
NSAppointmentAgent agent;
NSAppointmentEntity appointmentEntity;
Integer updateMode;
Bool sendEmailToParticipants;
NSEMailConnectionInfo smtpEMailConnectionInfo;
NSEMailConnectionInfo imapEMailConnectionInfo;
NSAppointmentEntity res = agent.Save(appointmentEntity, updateMode, sendEmailToParticipants, smtpEMailConnectionInfo, imapEMailConnectionInfo);
Parameters
| Type | Name | Description |
| Integer | updateMode | |
| Bool | sendEmailToParticipants |
Returns
| Type | Description |
| NSAppointmentEntity |
SaveAppointmentEntity(NSAppointmentEntity)
Saves an appointmentUpdates the existing NSAppointmentEntity or creates a new NSAppointmentEntity if the ID parameter is 0.
Declaration
NSAppointmentEntity SaveAppointmentEntity(NSAppointmentEntity appointmentEntity) Examples
NSAppointment agent;
NSAppointmentEntity thing = agent.CreateDefaultAppointmentEntity();
thing = agent.SaveAppointmentEntity(thing);
Parameters
| Type | Name | Description |
| NSAppointmentEntity | appointmentEntity |
Returns
| Type | Description |
| NSAppointmentEntity | The new or updated NSAppointmentEntity. |
SaveSuggestedAppointmentEntity(NSSuggestedAppointmentEntity)
Updates the existing NSSuggestedAppointmentEntity or creates a new NSSuggestedAppointmentEntity if the id parameter is 0
Declaration
NSSuggestedAppointmentEntity SaveSuggestedAppointmentEntity(NSSuggestedAppointmentEntity suggestedAppointmentEntity) Examples
NSAppointment agent;
NSSuggestedAppointmentEntity thing = agent.CreateDefaultSuggestedAppointmentEntity();
thing = agent.SaveSuggestedAppointmentEntity(thing);
Parameters
| Type | Name | Description |
| NSSuggestedAppointmentEntity | suggestedAppointmentEntity | The NSSuggestedAppointmentEntity to save. |
Returns
| Type | Description |
| NSSuggestedAppointmentEntity | New or updated NSSuggestedAppointmentEntity. |
SaveTaskListItem(NSTaskListItem)
Updates the existing NSTaskListItem or creates a new NSTaskListItem if the ID parameter is 0.
Declaration
NSTaskListItem SaveTaskListItem(NSTaskListItem taskListItem) Examples
NSAppointment agent;
NSTaskListItem thing = agent.CreateDefaultTaskListItem();
thing = agent.SaveTaskListItem(thing);
Parameters
| Type | Name | Description |
| NSTaskListItem | taskListItem | The item to save. |
Returns
| Type | Description |
| NSTaskListItem |
SetActivityStatus(String[],Integer)
Sets the completed status for an array of activities. The changes are saved immediately.
Declaration
Void SetActivityStatus(String[] activityIdentifier, Integer activityStatus) Parameters
| Type | Name | Description |
| String[] | activityIdentifier | May contain a mix of appointment_id, sale_id, document_id, and todo_id. |
| Integer | activityStatus | See <xref href="CRMScript.NetServer.ActivityStatus" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| Void |
SetSeen(Integer,Integer)
Sets an appointment invitation to seen.
Declaration
Void SetSeen(Integer appointmentId, Integer updateMode) Parameters
| Type | Name | Description |
| Integer | appointmentId | |
| Integer | updateMode | See <xref href="CRMScript.NetServer.RecurrenceUpdateMode" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| Void |
ToggleActivities(String[])
Toggles the completed status for an array of activities.
Declaration
Integer ToggleActivities(String[] activityIdentifier) Examples
NSAppointmentAgent agent;
String[] activityIdentifier;
Integer res = agent.ToggleActivities(activityIdentifier);
Parameters
| Type | Name | Description |
| String[] | activityIdentifier |
Returns
| Type | Description |
| Integer |
ToggleActivity(String)
Toggles the completed status for an activity. The changes are saved immediately.
Declaration
Integer ToggleActivity(String activityIdentifier) Examples
NSAppointmentAgent agent;
String activityIdentifier;
Integer res = agent.ToggleActivity(activityIdentifier);
Parameters
| Type | Name | Description |
| String | activityIdentifier | sale, document, or appointment. |
Returns
| Type | Description |
| Integer |
ToggleAndSetActivities(String[])
Toggles the first activity and sets the rest of the activities to the result of the first toggle.
Declaration
String[] ToggleAndSetActivities(String[] activityIdentifiers) Examples
NSAppointmentAgent agent;
String[] activityIdentifiers;
String[] res = agent.ToggleAndSetActivities(activityIdentifiers);
Parameters
| Type | Name | Description |
| String[] | activityIdentifiers |
Returns
| Type | Description |
| String[] |
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.
Declaration
Integer ToggleAppointmentStatus(Integer appointmentId) Examples
NSAppointmentAgent agent;
Integer appointmentId;
Integer res = agent.ToggleAppointmentStatus(appointmentId);
Parameters
| Type | Name | Description |
| Integer | appointmentId |
Returns
| Type | Description |
| Integer |
UpdateAppointment(Integer,Integer,Integer,Integer)
Updates an appointment record.
Declaration
NSAppointment UpdateAppointment(Integer id, DateTime startTime, DateTime endTime, Integer status, Integer type, Integer associateId) Parameters
| Type | Name | Description |
| Integer | id | |
| startTime | ||
| endTime | ||
| Integer | status | |
| Integer | type | |
| Integer | associateId |
Returns
| Type | Description |
| NSAppointment |
UpdateAppointmentFromIcsResponse(String)
Updates the attendance to an appointment based on incoming ICS RSVPs.
Declaration
Bool UpdateAppointmentFromIcsResponse(String emailAddress, NSStream icsData) Examples
NSAppointmentAgent agent;
String emailAddress;
NSStream icsData;
Bool res = agent.UpdateAppointmentFromIcsResponse(emailAddress, icsData);
Parameters
| Type | Name | Description |
| String | emailAddress | |
| icsData |
Returns
| Type | Description |
| Bool |
ValidateAppointmentEntity()
Checks that entity is ready for saving.
Declaration
Map ValidateAppointmentEntity(NSAppointmentEntity appointmentEntity) Examples
NSAppointmentAgent agent;
NSAppointmentEntity appointmentEntity;
Map res = agent.ValidateAppointmentEntity(appointmentEntity);
Parameters
| Type | Name | Description |
| NSAppointmentEntity | appointmentEntity |
Returns
| Type | Description |
| Map |
ValidateDays()
Validates the set of dates to calculate any conflicts.
Declaration
NSRecurrenceDate[] ValidateDays(NSAppointmentEntity appointmentEntity, DateTime[] dates) Examples
NSAppointmentAgent agent;
NSAppointmentEntity appointmentEntity;
DateTime[] dates;
NSRecurrenceDate[] res = agent.ValidateDays(appointmentEntity, dates);
Parameters
| Type | Name | Description |
| NSAppointmentEntity | appointmentEntity | |
| dates |
Returns
| Type | Description |
| NSRecurrenceDate[] |
WillSendEmail()
Returns true if the changes will trigger email sending on Save, so you can inform the user.
Declaration
Bool WillSendEmail(NSAppointmentEntity appointment) Examples
NSAppointmentAgent agent;
NSAppointmentEntity appointment;
Bool res = agent.WillSendEmail(appointment);
Parameters
| Type | Name | Description |
| NSAppointmentEntity | appointment |
Returns
| Type | Description |
| Bool | true if the changes will trigger email sending on Save. |