Class NSAppointmentAgent
Collection of all services that works with Appointment data.
Syntax
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSAppointmentAgent()
Collection of all services that works with Appointment data.
Declaration
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
Methods
Accept(Integer,Integer)
Accepts an appointment invitation.
Declaration
Void Accept(Integer appointmentId, Integer updateMode)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
Integer updateMode;
agent.Accept(appointmentId, updateMode);
AcceptRejected(Integer,Integer)
Accepts that an invited participant has rejected your invitation or assignment.
Declaration
NSAppointmentEntity AcceptRejected(Integer appointmentId, Integer updateMode)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
Integer updateMode;
NSAppointmentEntity res = agent.AcceptRejected(appointmentId, updateMode);
AcceptWithEmailConfirmation(Integer,Integer)
Accepts an appointment invitation and sends an email confirmation to the meeting organizer.
Declaration
Void AcceptWithEmailConfirmation(Integer appointmentId, Integer updateMode)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
Integer updateMode;
agent.AcceptWithEmailConfirmation(appointmentId, updateMode);
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)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
Integer updateMode;
NSEMailConnectionInfo smtpEMailConnectionInfo;
agent.AcceptWithSmtpEmailConfirmation(appointmentId, updateMode, smtpEMailConnectionInfo);
AssignTo(Integer,Integer)
Assigns an appointment to another person.
Declaration
NSAppointmentEntity AssignTo(Integer appointmentId, ParticipantInfo participant, Integer updateMode)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
ParticipantInfo participant;
Integer updateMode;
NSAppointmentEntity res = agent.AssignTo(appointmentId, participant, updateMode);
CalculateDays()
Calculates the set of dates that represents a recurrence pattern. Adds conflict information to each date.
Declaration
NSRecurrenceInfo CalculateDays(NSAppointmentEntity appointmentEntity)
Parameters
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
CanAssignToProjectMember(Integer,Integer)
Collection of all services that works with Appointment data.
Declaration
Bool CanAssignToProjectMember(Integer projectId, Integer suggestedAppointmentId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Integer |
suggestedAppointmentId |
|
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
CleanUpBookingDeleted(Integer[])
Deletes all appointments(within the appointmentIds array) with status BookingDeleted.
Declaration
Integer CleanUpBookingDeleted(Integer[] appointmentIds)
Parameters
Type |
Name |
Description |
Integer[] |
appointmentIds |
|
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
CleanUpRecurringBookingDeleted()
Deletes all appointments with status BookingDeleted and for logged-in user.
Declaration
Integer CleanUpRecurringBookingDeleted()
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
CreateAndAccept(Integer,Integer)
Creates an appointment from an emailItem invitation and accepting it.
Declaration
Void CreateAndAccept(Integer emailItemId, Integer updateMode)
Parameters
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
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
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
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)
Parameters
Returns
Type |
Description |
NSAppointmentEntity |
The newly created NSAppointmentEntity or null if the UID is in the DB already.
|
Examples
NSAppointmentAgent agent;
NSAppointmentEntity appointmentEntity;
String uID;
NSAppointmentEntity res = agent.CreateAppointmentForUID(appointmentEntity, uID);
CreateDefaultAppointmentEntity()
Sets default values into a new NSAppointmentEntity.
Declaration
NSAppointmentEntity CreateDefaultAppointmentEntity()
Returns
Examples
NSAppointmentAgent agent;
NSAppointmentEntity thing = agent.CreateDefaultAppointmentEntity();
thing = agent.SaveAppointmentEntity(thing);
CreateDefaultAppointmentEntityByType(Integer)
Creates an NSAppointmentEntity populated with the default values for the specific type.
Declaration
NSAppointmentEntity CreateDefaultAppointmentEntityByType(Integer type)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer type;
NSAppointmentEntity res = agent.CreateDefaultAppointmentEntityByType(type);
CreateDefaultAppointmentEntityByTypeAndAssociate(Integer,Integer)
Creates an NSAppointmentEntity populated with the default values for the specific type and owner.
Declaration
NSAppointmentEntity CreateDefaultAppointmentEntityByTypeAndAssociate(Integer type, Integer associateId)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer type;
Integer associateId;
NSAppointmentEntity res = agent.CreateDefaultAppointmentEntityByTypeAndAssociate(type, associateId);
CreateDefaultAppointmentEntityFromProjectSuggestion(Integer,Integer,Bool,Integer)
Collection of all services that works with Appointment data.
Declaration
NSAppointmentEntity CreateDefaultAppointmentEntityFromProjectSuggestion(Integer suggestedAppointmentId, Integer projectId, Bool createNow, Integer ownerId)
Parameters
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
CreateDefaultAppointmentEntityFromSaleSuggestion(Integer,Integer,Bool,Integer)
Creates an appointment based on a suggested appointment.
Declaration
NSAppointmentEntity CreateDefaultAppointmentEntityFromSaleSuggestion(Integer suggestedAppointmentId, Integer saleId, Bool createNow, Integer ownerId)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer suggestedAppointmentId;
Integer saleId;
Bool createNow;
Integer ownerId;
NSAppointmentEntity res = agent.CreateDefaultAppointmentEntityFromSaleSuggestion(suggestedAppointmentId, saleId, createNow, ownerId);
CreateDefaultRecurrence()
Creates an NSRecurrenceInfo object populated with the default values for the specific type.
Declaration
NSRecurrenceInfo CreateDefaultRecurrence()
Returns
Examples
NSAppointmentAgent agent;
NSRecurrenceInfo res = agent.CreateDefaultRecurrence();
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
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
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)
Parameters
Type |
Name |
Description |
Integer |
saleId |
|
Returns
Examples
NSAppointmentAgent agent;
Integer saleId;
NSAppointmentEntity res = agent.CreateDefaultReOpenAppointment(saleId);
CreateDefaultSuggestedAppointmentEntity()
Sets default values into a new NSSuggestedAppointmentEntity.
Declaration
NSSuggestedAppointmentEntity CreateDefaultSuggestedAppointmentEntity()
Returns
Examples
NSAppointmentAgent agent;
NSSuggestedAppointmentEntity thing = agent.CreateDefaultSuggestedAppointmentEntity();
thing = agent.SaveSuggestedAppointmentEntity(thing);
CreateDefaultTaskListItem()
Sets default values into a new NSTaskListItem.
Declaration
NSTaskListItem CreateDefaultTaskListItem()
Returns
Type |
Description |
NSTaskListItem |
A new NSTaskListItem with default values.
|
Examples
NSAppointmentAgent agent;
NSTaskListItem thing = agent.CreateDefaultTaskListItem();
thing = agent.SaveTaskListItem(thing);
DeclineInvitationFromEmailItem(Integer,String)
Declining an appointment invitation where no tentative appointments have been created.
Declaration
Void DeclineInvitationFromEmailItem(Integer emailItemId, String rejectReason)
Parameters
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
Delete(Integer,Integer,Bool)
Declaration
Void Delete(Integer appointmentId, Integer updateMode, Bool sendEmailToParticipants, NSEMailConnectionInfo smtpEMailConnectionInfo, NSEMailConnectionInfo imapEMailConnectionInfo)
Parameters
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
DeleteAppointmentEntity(Integer)
Deletes the NSAppointmentEntity.
Declaration
Void DeleteAppointmentEntity(Integer appointmentEntity)
Parameters
Type |
Name |
Description |
Integer |
appointmentEntity |
|
Returns
Examples
NSAppointmentAgent agent;
agent.DeleteAppointmentEntity(123);
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)
Parameters
Returns
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);
Gets activity information for one or more days according to the given date interval.
Declaration
NSActivityInformationListItem[] GetActivityInformationListByDatesAndAssociate(DateTime startDate, DateTime endDate, Integer associateId)
Parameters
Type |
Name |
Description |
|
startDate |
|
|
endDate |
|
Integer |
associateId |
|
Returns
NSAppointmentAgent agent;
DateTime startDate;
DateTime endDate;
Integer associateId;
NSActivityInformationListItem[] res = agent.GetActivityInformationListByDatesAndAssociate(startDate, endDate, associateId);
GetAlarms(Bool,Bool,Integer)
Collection of all services that works with Appointment data.
Declaration
NSMultiAlarmData GetAlarms(Bool includeInvitations, Bool includeAllAppointments, Integer defaultAlarmLeadTimeInMinutes)
Parameters
Type |
Name |
Description |
Bool |
includeInvitations |
|
Bool |
includeAllAppointments |
|
Integer |
defaultAlarmLeadTimeInMinutes |
|
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
GetAppointment(Integer)
Gets an NSAppointment object.
Declaration
NSAppointment GetAppointment(Integer appointmentId)
Parameters
Type |
Name |
Description |
Integer |
appointmentId |
|
Returns
Examples
NSAppointmentAgent agent;
NSAppointment thing = agent.GetAppointment(123);
GetAppointmentEntity(Integer)
Gets an NSAppointmentEntity object.
Declaration
NSAppointmentEntity GetAppointmentEntity(Integer appointmentEntityId)
Parameters
Type |
Name |
Description |
Integer |
appointmentEntityId |
|
Returns
Examples
NSAppointmentAgent agent;
NSAppointmentEntity thing = agent.GetAppointmentEntity(123);
GetAppointmentFromUID(String)
Gets the appointment that corresponds to the given UID.
Declaration
NSAppointmentEntity GetAppointmentFromUID(String uID)
Parameters
Type |
Name |
Description |
String |
uID |
|
Returns
Examples
NSAppointmentAgent agent;
String uID;
NSAppointmentEntity res = agent.GetAppointmentFromUID(uID);
GetAppointmentHaveParticipantsWithEmail(Integer)
Checks if any of the participants is marked to receive emails on this appointment.
Declaration
Bool GetAppointmentHaveParticipantsWithEmail(Integer appointmentId)
Parameters
Type |
Name |
Description |
Integer |
appointmentId |
|
Returns
Type |
Description |
Bool |
False if no participants are defined.
|
Examples
NSAppointmentAgent agent;
Integer appointmentId;
Bool res = agent.GetAppointmentHaveParticipantsWithEmail(appointmentId);
GetAppointmentList(Integer[])
Retrieves an array of NSAppointment objects.
Declaration
NSAppointment[] GetAppointmentList()
Parameters
Type |
Name |
Description |
Integer[] |
appointmentIds |
The identifiers of the appointments.
|
Returns
Examples
Integer[] ids;
NSAppointmentAgent agent;
agent.GetAppointmentList(ids);
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
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
GetAppointmentsByTaskHeading(Integer)
Returns appointments of a specific appointment task heading.
Declaration
NSAppointment[] GetAppointmentsByTaskHeading(Integer taskHeadingId)
Parameters
Type |
Name |
Description |
Integer |
taskHeadingId |
The heading represents a grouping or filtering of tasks.
|
Returns
Examples
NSAppointmentAgent agent;
Integer taskHeadingId;
NSAppointment[] res = agent.GetAppointmentsByTaskHeading(taskHeadingId);
GetAssociateDiary(Integer,Integer)
Collection of all services that works with Appointment data.
Declaration
NSAppointment[] GetAssociateDiary(Integer associateId, DateTime startTime, DateTime endTime, Integer count)
Parameters
Type |
Name |
Description |
Integer |
associateId |
|
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
GetAssociatesDiary(Integer[])
Collection of all services that works with Appointment data.
Declaration
NSAppointment[] GetAssociatesDiary(Integer[] associateIds, DateTime startTime, DateTime endTime)
Parameters
Type |
Name |
Description |
Integer[] |
associateIds |
|
|
startTime |
|
|
endTime |
|
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
GetCanInsertForAssociates(Integer[])
Checks if the current associate can create appointments in the diary of other associates.
Declaration
Bool[] GetCanInsertForAssociates(Integer[] 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.
|
Examples
NSAppointmentAgent agent;
Integer[] associateIds;
Bool[] res = agent.GetCanInsertForAssociates(associateIds);
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)
Parameters
Type |
Name |
Description |
Integer |
contactId |
|
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Returns
NSAppointmentAgent agent;
Integer contactId;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetContactAppointments(contactId, startTime, endTime, count);
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)
Parameters
Returns
NSAppointmentAgent agent;
Integer contactId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskId;
NSAppointment[] res = agent.GetContactAppointmentsByTask(contactId, startTime, endTime, count, taskId);
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)
Parameters
Type |
Name |
Description |
Integer |
contactId |
|
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Integer |
taskHeadingId |
The heading represents a grouping or filtering of tasks.
|
Returns
NSAppointmentAgent agent;
Integer contactId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskHeadingId;
NSAppointment[] res = agent.GetContactAppointmentsByTaskHeading(contactId, startTime, endTime, count, taskHeadingId);
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)
Parameters
Returns
NSAppointmentAgent agent;
Integer contactId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer[] taskIds;
NSAppointment[] res = agent.GetContactAppointmentsByTasks(contactId, startTime, endTime, count, taskIds);
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)
Parameters
Returns
NSAppointmentAgent agent;
Integer contactId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer appointmentType;
NSAppointment[] res = agent.GetContactAppointmentsByType(contactId, startTime, endTime, count, appointmentType);
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)
Parameters
Type |
Name |
Description |
|
startTime |
|
|
endTime |
|
Integer |
associateId |
|
Returns
NSAppointmentAgent agent;
DateTime startDate;
DateTime endDate;
Integer associateId;
NSDayInformationListItem[] res = agent.GetDayInformationListByDatesAndAssociate(startDate, endDate, associateId);
GetDiaryByGroup(Integer,Integer,Integer)
Collection of all services that works with Appointment data.
Declaration
NSAppointment[] GetDiaryByGroup(Integer groupId, Integer groupType, DateTime startTime, DateTime endTime, Integer count)
Parameters
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
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)
Parameters
Type |
Name |
Description |
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Returns
Examples
NSAppointmentAgent agent;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetMyAppointments(startTime, endTime, count);
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)
Parameters
Type |
Name |
Description |
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Returns
Examples
NSAppointmentAgent agent;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetMyDiary(startTime, endTime, count);
GetMyPublishedAppointments()
Gets published appointments from the logged in user.
Declaration
NSAppointment[] GetMyPublishedAppointments()
Returns
Examples
NSAppointmentAgent agent;
NSAppointment[] res = agent.GetMyPublishedAppointments();
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)
Parameters
Type |
Name |
Description |
|
startTime |
|
|
endTime |
|
Returns
Examples
NSAppointmentAgent agent;
DateTime startTime;
DateTime endTime;
NSAppointmentSyncData[] res = agent.GetMySyncAppointments(startTime, endTime);
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)
Parameters
Type |
Name |
Description |
Integer |
count |
|
Returns
Examples
NSAppointmentAgent agent;
Integer count;
NSAppointment[] res = agent.GetMyTasks(count);
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)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer saleId;
Integer currentAppointmentId;
Bool skipCompleteCheck;
NSSuggestedAppointment res = agent.GetNextSuggestedAppointmentBySale(saleId, currentAppointmentId, skipCompleteCheck);
GetOrganizerName(Integer)
Looks up the name / email of an event-organizer
Declaration
String GetOrganizerName(Integer motherAppointmentId)
Parameters
Type |
Name |
Description |
Integer |
motherAppointmentId |
|
Returns
Examples
NSAppointmentAgent agent;
Integer motherAppointmentId;
String res = agent.GetOrganizerName(motherAppointmentId);
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)
Parameters
Type |
Name |
Description |
Integer |
personId |
|
Bool |
includeProjectAppointments |
|
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Returns
Examples
NSAppointmentAgent agent;
Integer personId;
Bool includeProjectAppointments;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetPersonAppointments(personId, includeProjectAppointments, startTime, endTime, count);
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)
Parameters
Returns
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);
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)
Parameters
Type |
Name |
Description |
Integer |
personId |
|
Bool |
includeProjectAppointments |
|
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Integer |
taskHeadingId |
The heading represents a grouping or filtering of tasks.
|
Returns
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);
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)
Parameters
Returns
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);
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)
Parameters
Returns
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);
GetPersonDiary(Integer,Integer)
Returns a specified number of appointments within a time range.
Declaration
NSAppointment[] GetPersonDiary(Integer personId, DateTime startTime, DateTime endTime, Integer count)
Parameters
Type |
Name |
Description |
Integer |
personId |
|
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Returns
Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetPersonDiary(personId, startTime, endTime, count);
GetPersonTasks(Integer,Integer)
Returns a specified number of appointments within a time range.
Declaration
NSAppointment[] GetPersonTasks(Integer personId, Integer count)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer personId;
Integer count;
NSAppointment[] res = agent.GetPersonTasks(personId, count);
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)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Returns
Examples
NSAppointmentAgent agent;
Integer projectId;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetProjectAppointments(projectId, startTime, endTime, count);
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)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Integer |
taskId |
The different types of activities, such as Phone call or Meeting.
|
Returns
Examples
NSAppointmentAgent agent;
Integer projectId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskId;
NSAppointment[] res = agent.GetProjectAppointmentsByTask(projectId, startTime, endTime, count, taskId);
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)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Integer |
taskHeadingId |
The heading represents a grouping or filtering of tasks.
|
Returns
Examples
NSAppointmentAgent agent;
Integer projectId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskHeadingId;
NSAppointment[] res = agent.GetProjectAppointmentsByTaskHeading(projectId, startTime, endTime, count, taskHeadingId);
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)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer projectId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer[] taskIds;
NSAppointment[] res = agent.GetProjectAppointmentsByTasks(projectId, startTime, endTime, count, taskIds);
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)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer projectId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer appointmentType;
NSAppointment[] res = agent.GetProjectAppointmentsByType(projectId, startTime, endTime, count, appointmentType);
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)
Parameters
Type |
Name |
Description |
Integer |
personId |
|
|
startTime |
|
|
endTime |
|
Integer |
count |
|
Returns
Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
NSAppointment[] res = agent.GetProjectMemberAppointments(personId, startTime, endTime, count);
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)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskId;
NSAppointment[] res = agent.GetProjectMemberAppointmentsByTask(personId, startTime, endTime, count, taskId);
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)
Parameters
Type |
Name |
Description |
Integer |
personId |
|
Integer |
count |
|
Integer |
taskHeadingId |
The heading represents a grouping or filtering of tasks.
|
Returns
Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer taskHeadingId;
NSAppointment[] res = agent.GetProjectMemberAppointmentsByTaskHeading(personId, startTime, endTime, count, taskHeadingId);
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)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer[] taskIds;
NSAppointment[] res = agent.GetProjectMemberAppointmentsByTasks(personId, startTime, endTime, count, taskIds);
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)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer personId;
DateTime startTime;
DateTime endTime;
Integer count;
Integer appointmentType;
NSAppointment[] res = agent.GetProjectMemberAppointmentsByType(personId, startTime, endTime, count, appointmentType);
GetPublishedAppointment(Integer)
Gets published appointment by appointment ID.
Declaration
NSAppointment GetPublishedAppointment(Integer appointmentId)
Parameters
Type |
Name |
Description |
Integer |
appointmentId |
|
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
NSAppointment res = agent.GetPublishedAppointment(appointmentId);
GetPublishedAppointments(Integer[])
Gets published appointments by appointment IDs.
Declaration
NSAppointment[] GetPublishedAppointments(Integer[] appointmentIds)
Parameters
Type |
Name |
Description |
Integer[] |
appointmentIds |
|
Returns
Examples
NSAppointmentAgent agent;
Integer[] appointmentIds;
NSAppointment[] res = agent.GetPublishedAppointments(appointmentIds);
GetPublishedProjectAppointments(Integer)
Gets published appointments by project ID.
Declaration
NSAppointment[] GetPublishedProjectAppointments(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Returns
Examples
NSAppointmentAgent agent;
Integer projectId;
NSAppointment[] res = agent.GetPublishedProjectAppointments(projectId);
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)
Parameters
Type |
Name |
Description |
|
startTime |
|
|
endTime |
|
Integer |
associateId |
|
Returns
NSAppointmentAgent agent;
DateTime startDate;
DateTime endDate;
Integer associateId;
NSRedLetterInformationListItem[] res = agent.GetRedLetterInformationListByDatesAndAssociate(startDate, endDate, associateId);
GetSuggestedAppointment(Integer)
Gets an NSSuggestedAppointment object.
Declaration
NSSuggestedAppointment GetSuggestedAppointment(Integer suggestedAppointmentId)
Parameters
Type |
Name |
Description |
Integer |
suggestedAppointmentId |
|
Returns
Examples
NSAppointmentAgent agent;
NSSuggestedAppointment thing = agent.GetSuggestedAppointment(123);
GetSuggestedAppointmentEntity(Integer)
Gets an NSSuggestedAppointmentEntity object.
Declaration
NSSuggestedAppointmentEntity GetSuggestedAppointmentEntity(Integer suggestedAppointmentEntityId)
Parameters
Type |
Name |
Description |
Integer |
suggestedAppointmentEntityId |
|
Returns
Examples
NSAppointmentAgent agent;
NSSuggestedAppointmentEntity thing = agent.GetSuggestedAppointmentEntity(123);
GetTaskListItem(Integer)
Gets an NSTaskListItem object.
Declaration
NSTaskListItem GetTaskListItem(Integer taskListItemId)
Parameters
Type |
Name |
Description |
Integer |
taskListItemId |
|
Returns
Examples
NSAppointmentAgent agent;
NSTaskListItem thing = agent.GetTaskListItem(123);
GetTaskListItems(Bool)
Declaration
NSTaskListItem[] GetTaskListItems(Bool includeDeleted)
Parameters
Type |
Name |
Description |
Bool |
includeDeleted |
|
Returns
Examples
NSAppointmentAgent agent;
Bool includeDeleted;
NSTaskListItem[] res = agent.GetTaskListItems(includeDeleted);
GetUIDFromAppointmentId(Integer,Bool)
Gets the UID associated with the appointment id in the Invitation table.
Declaration
String GetUIDFromAppointmentId(Integer appointmentId, Bool useMotherId)
Parameters
Type |
Name |
Description |
Integer |
appointmentId |
|
Bool |
useMotherId |
|
Returns
Type |
Description |
String |
The associated UID, or null if none exist.
|
Examples
NSAppointmentAgent agent;
Integer appointmentId;
Bool useMotherId;
String res = agent.GetUIDFromAppointmentId(appointmentId, useMotherId);
Move(Integer,Integer)
Moving a booking to another start time.
Declaration
NSAppointmentEntity Move(Integer appointmentId, DateTime newStartTime, Integer updateMode)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
DateTime newStartTime;
Integer updateMode;
NSAppointmentEntity res = agent.Move(appointmentId, newStartTime, updateMode);
Reject(Integer,String,Integer)
Rejecting an appointment invitation
Declaration
Void Reject(Integer appointmentId, String rejectReason, Integer updateMode)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
String rejectReason;
Integer updateMode;
agent.Reject(appointmentId, rejectReason, updateMode);
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)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
String rejectReason;
Integer updateMode;
agent.RejectWithEmailConfirmation(appointmentId, rejectReason, updateMode);
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)
Parameters
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
String rejectReason;
Integer updateMode;
NSEMailConnectionInfo smtpEMailConnectionInfo;
agent.RejectWithSmtpEmailConfirmation(appointmentId, rejectReason, updateMode, smtpEMailConnectionInfo);
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)
Parameters
Returns
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);
Save(Integer,Bool)
Declaration
NSAppointmentEntity Save(NSAppointmentEntity appointmentEntity, Integer updateMode, Bool sendEmailToParticipants, NSEMailConnectionInfo smtpEMailConnectionInfo, NSEMailConnectionInfo imapEMailConnectionInfo)
Parameters
Type |
Name |
Description |
Integer |
updateMode |
|
Bool |
sendEmailToParticipants |
|
Returns
Examples
NSAppointmentAgent agent;
NSAppointmentEntity appointmentEntity;
Integer updateMode;
Bool sendEmailToParticipants;
NSEMailConnectionInfo smtpEMailConnectionInfo;
NSEMailConnectionInfo imapEMailConnectionInfo;
NSAppointmentEntity res = agent.Save(appointmentEntity, updateMode, sendEmailToParticipants, smtpEMailConnectionInfo, imapEMailConnectionInfo);
SaveAppointmentEntity(NSAppointmentEntity)
Saves an appointmentUpdates the existing NSAppointmentEntity or creates a new NSAppointmentEntity if the ID parameter is 0.
Declaration
NSAppointmentEntity SaveAppointmentEntity(NSAppointmentEntity appointmentEntity)
Parameters
Returns
Examples
NSAppointment agent;
NSAppointmentEntity thing = agent.CreateDefaultAppointmentEntity();
thing = agent.SaveAppointmentEntity(thing);
SaveSuggestedAppointmentEntity(NSSuggestedAppointmentEntity)
Updates the existing NSSuggestedAppointmentEntity or creates a new NSSuggestedAppointmentEntity if the id parameter is 0
Declaration
NSSuggestedAppointmentEntity SaveSuggestedAppointmentEntity(NSSuggestedAppointmentEntity suggestedAppointmentEntity)
Parameters
Returns
Examples
NSAppointment agent;
NSSuggestedAppointmentEntity thing = agent.CreateDefaultSuggestedAppointmentEntity();
thing = agent.SaveSuggestedAppointmentEntity(thing);
SaveTaskListItem(NSTaskListItem)
Updates the existing NSTaskListItem or creates a new NSTaskListItem if the ID parameter is 0.
Declaration
NSTaskListItem SaveTaskListItem(NSTaskListItem taskListItem)
Parameters
Returns
Examples
NSAppointment agent;
NSTaskListItem thing = agent.CreateDefaultTaskListItem();
thing = agent.SaveTaskListItem(thing);
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 ActivityStatus.
|
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
SetSeen(Integer,Integer)
Sets an appointment invitation to seen.
Declaration
Void SetSeen(Integer appointmentId, Integer updateMode)
Parameters
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
ToggleActivities(String[])
Toggles the completed status for an array of activities.
Declaration
Integer ToggleActivities(String[] activityIdentifier)
Parameters
Type |
Name |
Description |
String[] |
activityIdentifier |
|
Returns
Examples
NSAppointmentAgent agent;
String[] activityIdentifier;
Integer res = agent.ToggleActivities(activityIdentifier);
ToggleActivity(String)
Toggles the completed status for an activity. The changes are saved immediately.
Declaration
Integer ToggleActivity(String activityIdentifier)
Parameters
Type |
Name |
Description |
String |
activityIdentifier |
sale, document, or appointment.
|
Returns
Examples
NSAppointmentAgent agent;
String activityIdentifier;
Integer res = agent.ToggleActivity(activityIdentifier);
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)
Parameters
Type |
Name |
Description |
String[] |
activityIdentifiers |
|
Returns
Remarks
Examples
NSAppointmentAgent agent;
String[] activityIdentifiers;
String[] res = agent.ToggleAndSetActivities(activityIdentifiers);
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)
Parameters
Type |
Name |
Description |
Integer |
appointmentId |
|
Returns
Examples
NSAppointmentAgent agent;
Integer appointmentId;
Integer res = agent.ToggleAppointmentStatus(appointmentId);
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
Returns
Examples
NSAppointmentAgent agent;
agent.callMethod(arg1, arg2);
UpdateAppointmentFromIcsResponse(String)
Updates the attendance to an appointment based on incoming ICS RSVPs.
Declaration
Bool UpdateAppointmentFromIcsResponse(String emailAddress, NSStream icsData)
Parameters
Type |
Name |
Description |
String |
emailAddress |
|
|
icsData |
|
Returns
Examples
NSAppointmentAgent agent;
String emailAddress;
NSStream icsData;
Bool res = agent.UpdateAppointmentFromIcsResponse(emailAddress, icsData);
ValidateAppointmentEntity()
Checks that entity is ready for saving.
Declaration
Map ValidateAppointmentEntity(NSAppointmentEntity appointmentEntity)
Parameters
Returns
Examples
NSAppointmentAgent agent;
NSAppointmentEntity appointmentEntity;
Map res = agent.ValidateAppointmentEntity(appointmentEntity);
ValidateDays()
Validates the set of dates to calculate any conflicts.
Declaration
NSRecurrenceDate[] ValidateDays(NSAppointmentEntity appointmentEntity, DateTime[] dates)
Parameters
Returns
Examples
NSAppointmentAgent agent;
NSAppointmentEntity appointmentEntity;
DateTime[] dates;
NSRecurrenceDate[] res = agent.ValidateDays(appointmentEntity, dates);
WillSendEmail()
Returns true if the changes will trigger email sending on Save, so you can inform the user.
Declaration
Bool WillSendEmail(NSAppointmentEntity appointment)
Parameters
Returns
Type |
Description |
Bool |
true if the changes will trigger email sending on Save.
|
Examples
NSAppointmentAgent agent;
NSAppointmentEntity appointment;
Bool res = agent.WillSendEmail(appointment);