Class NSProjectAgent
Collection of all services that work with Project data.
Syntax
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSProjectAgent()
Collection of all services that work with Project data.
Declaration
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
Methods
AddProjectMembers(Integer,NSProjectMember[])
Adds multiple project members to a project
Declaration
Void AddProjectMembers(Integer projectEntityId, NSProjectMember[] projectMembers)
Parameters
Returns
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
CreateDefaultProjectEntity()
Sets default values into a new NSProjectEntity.
Declaration
NSProjectEntity CreateDefaultProjectEntity()
Returns
Examples
NSProjectAgent agent;
NSProjectEntity thing = agent.CreateDefaultProjectEntity();
thing = agent.SaveProjectEntity(thing);
CreateDefaultProjectEventEntity()
Sets default values into a new NSProjectEventEntity.
Declaration
NSProjectEventEntity CreateDefaultProjectEventEntity()
Returns
Examples
NSProjectAgent agent;
NSProjectEventEntity thing = agent.CreateDefaultProjectEventEntity();
thing = agent.SaveProjectEventEntity(thing);
CreateDefaultProjectMember()
Sets default values into a new NSProjectMember.
Declaration
NSProjectMember CreateDefaultProjectMember()
Returns
Examples
NSProjectAgent agent;
NSProjectMember thing = agent.CreateDefaultProjectMember();
thing = agent.SaveProjectMember(thing);
CreateNewEntry()
Creates a new project based on external duplicate
Declaration
Integer CreateNewEntry(NSDuplicateEntry duplicate)
Returns
Examples
NSProjectAgent agent;
NSDuplicateEntry duplicate;
Integer res = agent.CreateNewEntry(duplicate);
DeleteProjectEntity(Integer)
Deletes the NSProjectEntity
Declaration
DeleteProjectEntity(Integer projectEntity)
Parameters
Type |
Name |
Description |
Integer |
projectEntity |
|
Returns
Examples
NSProjectAgent agent;
agent.DeleteProjectEntity(123);
DeleteProjectEventEntity(Integer)
Deletes the NSProjectEventEntity
Declaration
DeleteProjectEventEntity(Integer projectEventEntity)
Parameters
Type |
Name |
Description |
Integer |
projectEventEntity |
|
Returns
Examples
NSProjectAgent agent;
agent.DeleteProjectEventEntity(123);
DeleteProjectEventEntityFromProjectId(Integer)
Deletes a project event based on a project ID. Does not delete the project, but does delete the published and ExternalEvent and AudienceVisibility records.
Declaration
Void DeleteProjectEventEntityFromProjectId(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Returns
Examples
NSProjectAgent agent;
Integer projectId;
agent.DeleteProjectEventEntityFromProjectId(projectId);
DeleteProjectMember(Integer)
Deletes the NSProjectMember
Declaration
DeleteProjectMember(Integer projectMember)
Parameters
Type |
Name |
Description |
Integer |
projectMember |
|
Returns
Examples
NSProjectAgent agent;
agent.DeleteProjectMember(123);
DeleteProjectMemberByIds(Integer[])
Deletes project-member rows.
Declaration
Void DeleteProjectMemberByIds(Integer[] projectMemberIds)
Parameters
Type |
Name |
Description |
Integer[] |
projectMemberIds |
|
Returns
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
DeleteProjectMembers(Integer,Integer[])
Deletes the given project members from a project
Declaration
Void DeleteProjectMembers(Integer projectEntityId, Integer[] memberIds)
Parameters
Returns
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
GetDuplicateRules()
Retrieve all available duplicate rules for project
Declaration
NSDuplicateRule[] GetDuplicateRules()
Returns
Examples
NSProjectAgent agent;
NSDuplicateRule[] res = agent.GetDuplicateRules();
GetDuplicates(String)
Gets duplicates(exact or similar in the database) based on the name
Declaration
NSDuplicateEntry[] GetDuplicates(String name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Examples
NSProjectAgent agent;
String name;
NSDuplicateEntry[] res = agent.GetDuplicates(name);
GetMyMemberProjects()
Returns projects where an user is project member.
Declaration
NSProject[] GetMyMemberProjects()
Returns
Examples
NSProjectAgent agent;
NSProject[] res = agent.GetMyMemberProjects();
GetMyProjectEvents()
Gets all project events that belongs to the currently logged-on user.
Declaration
NSProjectEvent[] GetMyProjectEvents()
Returns
Type |
Description |
NSProjectEvent[] |
The list of events is filtered by the Audience Visibility restrictions set when the project event is created.
|
Examples
NSProjectAgent agent;
NSProjectEvent[] res = agent.GetMyProjectEvents();
GetMyProjects(Bool)
Returns projects belonging to an associate. If memberProjects is false only the projects where the associate is project responsible is returned, otherwise both the projects where the associate is project responsible and project member is returned.
Declaration
NSProject[] GetMyProjects(Bool includeMemberProjects)
Parameters
Type |
Name |
Description |
Bool |
includeMemberProjects |
|
Returns
Examples
NSProjectAgent agent;
Bool includeMemberProjects;
NSProject[] res = agent.GetMyProjects(includeMemberProjects);
GetMyPublishedProjects()
Gets published projects from the logged in user.
Declaration
NSProject[] GetMyPublishedProjects()
Returns
Examples
NSProjectAgent agent;
NSProject[] res = agent.GetMyPublishedProjects();
GetNextMilestone(Integer)
Collection of all services that work with Project data.
Declaration
NSAppointment GetNextMilestone(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
Next upcoming milestone appointment.
|
Returns
Examples
NSProjectAgent agent;
Integer projectId;
NSAppointment res = agent.GetNextMilestone(projectId);
GetNextProjectStatus(Integer)
Collection of all services that work with Project data.
Declaration
Integer GetNextProjectStatus(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Returns
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
GetProject(Integer)
Gets an NSProject object.
Declaration
NSProject GetProject(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Returns
Examples
NSProjectAgent agent;
NSProject thing = agent.GetProject(123);
GetProjectEntity(Integer)
Gets an NSProjectEntity object.
Declaration
NSProjectEntity GetProjectEntity(Integer projectEntityId)
Parameters
Type |
Name |
Description |
Integer |
projectEntityId |
|
Returns
Examples
NSProjectAgent agent;
NSProjectEntity thing = agent.GetProjectEntity(123);
GetProjectEvent(Integer)
Gets an NSProjectEvent object.
Declaration
NSProjectEvent GetProjectEvent(Integer projectEventId)
Parameters
Type |
Name |
Description |
Integer |
projectEventId |
|
Returns
Examples
NSProjectAgent agent;
NSProjectEvent thing = agent.GetProjectEvent(123);
GetProjectEventEntity(Integer)
Gets an NSProjectEventEntity object.
Declaration
NSProjectEventEntity GetProjectEventEntity(Integer projectEventEntityId)
Parameters
Type |
Name |
Description |
Integer |
projectEventEntityId |
|
Returns
Examples
NSProjectAgent agent;
NSProjectEventEntity thing = agent.GetProjectEventEntity(123);
GetProjectEventEntityFromProjectId(Integer)
Gets an NSProjectEventEntity based on a projectId.
Declaration
NSProjectEventEntity GetProjectEventEntityFromProjectId(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Returns
Examples
NSProjectAgent agent;
Integer projectId;
NSProjectEventEntity res = agent.GetProjectEventEntityFromProjectId(projectId);
GetProjectEventList(Integer[])
Gets an array of NSProjectEvent objects.
Declaration
NSProjectEvent[] GetProjectEventList(Integer[] projectEventIds)
Parameters
Type |
Name |
Description |
Integer[] |
projectEventIds |
|
Returns
Examples
Integer[] ids;
NSProjectAgent agent;
NSProjectEvent[] res = agent.GetProjectEventList(ids);
GetProjectEventOnPerson(Integer,Integer)
Gets an NSProjectEvent object from a project and a person.
Declaration
NSProjectEvent GetProjectEventOnPerson(Integer projectId, Integer personId)
Parameters
Returns
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
GetProjectEventsOnPerson(Integer)
Gets all project events that belongs to the person specified.
Declaration
NSProjectEvent[] GetProjectEventsOnPerson(Integer personId)
Parameters
Type |
Name |
Description |
Integer |
personId |
|
Returns
Type |
Description |
NSProjectEvent[] |
The list of events are filtered by the Audience Visibility restrictions set when the project event is created.
|
Examples
NSProjectAgent agent;
Integer personId;
NSProjectEvent[] res = agent.GetProjectEventsOnPerson(personId);
GetProjectImage(Integer)
Returns the project image that is displayed in the CRM application.
Declaration
NSImage GetProjectImage(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Returns
Examples
NSProjectAgent agent;
Integer projectId;
NSImage res = agent.GetProjectImage(projectId);
GetProjectList(Integer[])
Gets an array of Project objects.
Declaration
NSProject[] GetProjectList(Integer[] projectIds)
Parameters
Type |
Name |
Description |
Integer[] |
projectIds |
|
Returns
Examples
Integer[] ids;
NSProjectAgent agent;
NSProject[] res = agent.GetProjectList(ids);
GetProjectMember(Integer)
Gets an NSProjectMember object.
Declaration
NSProjectMember GetProjectMember(Integer projectMemberId)
Parameters
Type |
Name |
Description |
Integer |
projectMemberId |
|
Returns
Examples
NSProjectAgent agent;
NSProjectMember thing = agent.GetProjectMember(123);
GetProjectMembers(Integer)
Returns an array of project members
Declaration
NSProjectMember[] GetProjectMembers(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Returns
Examples
NSProjectAgent agent;
Integer projectId;
NSProjectMember[] res = agent.GetProjectMembers(projectId);
GetProjectMembersById(Integer[])
Returns an array of project members.
Declaration
NSProjectMember[] GetProjectMembersById(Integer[] projectMemberIds)
Parameters
Type |
Name |
Description |
Integer[] |
projectMemberIds |
|
Returns
Examples
NSProjectAgent agent;
Integer rojectMemberIds;
NSProjectMember[] res = agent.GetProjectMembersById(projectMemberIds);
Returns all projects where the given contact has project members.
Declaration
NSProject[] GetProjectsFromContact(Integer contactId)
Parameters
Type |
Name |
Description |
Integer |
contactId |
|
Returns
NSProjectAgent agent;
Integer contactId;
NSProject[] res = agent.GetProjectsFromContact(contactId);
GetProjectsFromPerson(Integer)
Returns all projects where the person is project member.
Declaration
NSProject[] GetProjectsFromPerson(Integer personId)
Parameters
Type |
Name |
Description |
Integer |
personId |
|
Returns
Examples
NSProjectAgent agent;
Integer personId;
NSProject[] res = agent.GetProjectsFromPerson(personId);
GetPublishedProject(Integer)
Gets published project by project ID.
Declaration
NSProject GetPublishedProject(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Returns
Examples
NSProjectAgent agent;
Integer projectId;
NSProject res = agent.GetPublishedProject(projectId);
GetPublishedProjects(Integer[])
Gets published projects by project IDs.
Declaration
NSProject[] GetPublishedProjects(Integer[] projectIds)
Parameters
Type |
Name |
Description |
Integer[] |
projectIds |
|
Returns
Examples
NSProjectAgent agent;
Integer[] projectIds;
NSProject[] res = agent.GetPublishedProjects(projectIds);
GetPublishedProjectsOnPersonId(Integer)
Gets published projects where person is a member
Declaration
NSProject[] GetPublishedProjectsOnPersonId(Integer personId)
Parameters
Type |
Name |
Description |
Integer |
personId |
|
Returns
Examples
NSProjectAgent agent;
Integer personId;
NSProject[] res = agent.GetPublishedProjectsOnPersonId(personId);
HasGuide(Integer)
Collection of all services that work with Project data.
Declaration
Bool HasGuide(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Returns
Type |
Description |
Bool |
Does this project have a guide associated with its project type?
|
Examples
NSProjectAgent agent;
Integer projectId;
Bool res = agent.HasGuide(projectId);
HasGuideActivities(Integer)
Collection of all services that work with Project data.
Declaration
Bool HasGuideActivities(Integer projectId)
Parameters
Type |
Name |
Description |
Integer |
projectId |
|
Returns
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
IsNumberValid(Integer,String)
Checks if the number is unique or required.
Declaration
Bool IsNumberValid(Integer contactId, String number)
Parameters
Returns
Examples
NSProjectAgent agent;
Integer contactId;
String number;
Bool res = agent.IsNumberValid(contactId, number);
Merge(Integer,Integer,Bool)
Merges two projects into one, removing the source project in the process
Declaration
Void Merge(Integer sourceProjectId, Integer destinationProjectId, Bool replaceEmptyFieldsOnDestination)
Parameters
Type |
Name |
Description |
Integer |
sourceProjectId |
|
Integer |
destinationProjectId |
|
Bool |
replaceEmptyFieldsOnDestination |
|
Returns
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
OfferAutoNextStatusOnApppointmentCompleted(Integer)
Collection of all services that work with Project data.
Declaration
Bool OfferAutoNextStatusOnApppointmentCompleted(Integer appointmentId)
Parameters
Type |
Name |
Description |
Integer |
appointmentId |
|
Returns
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
SaveProjectEntity(NSProjectEntity)
Updates the existing NSProjectEntity or creates a new NSProjectEntity if the ID parameter is 0.
Declaration
NSProjectEntity SaveProjectEntity(NSProjectEntity projectEntity)
Parameters
Returns
Examples
NSProject agent;
NSProjectEntity thing = agent.CreateDefaultProjectEntity();
thing = agent.SaveProjectEntity(thing);
SaveProjectEventEntity(NSProjectEventEntity)
Updates the existing NSProjectEventEntity or creates a new NSProjectEventEntity if the ID parameter is 0.
Returns.
Declaration
NSProjectEventEntity SaveProjectEventEntity(NSProjectEventEntity entity)
Parameters
Returns
Examples
NSProject agent;
NSProjectEventEntity thing = agent.CreateDefaultProjectEventEntity();
thing = agent.SaveProjectEventEntity(thing);
SaveProjectMember(NSProjectMember)
Updates the existing NSProjectMember or creates a new NSProjectMember if the id parameter is 0
Declaration
NSProjectMember SaveProjectMember(NSProjectMember projectMember)
Parameters
Type |
Name |
Description |
NSProjectMember |
projectMember |
The NSProjectMember to save.
|
Returns
Examples
NSProject agent;
NSProjectMember thing = agent.CreateDefaultProjectMember();
thing = agent.SaveProjectMember(thing);
Saves role and comment on an array of project members represented by IDs.
Declaration
Void SaveProjectMembersFunctionAndComment(Integer[] projectMemberIds, Integer roleId, String comment)
Parameters
Returns
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
SetDuplicateRulesStatus(NSDuplicateRule[])
Sets which duplicate rules should be active or not
Declaration
Void SetDuplicateRulesStatus(NSDuplicateRule[] rules)
Parameters
Returns
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
SetProjectImage(Integer,NSImage)
Stores the project image that is displayed in the CRM application.
Declaration
Void SetProjectImage(Integer projectId, NSImage image)
Parameters
Returns
Examples
NSProjectAgent agent;
agent.callMethod(arg1, arg2);
UpdateProjectMember(NSProjectMember)
Updates an NSProjectMember row.
Declaration
NSProjectMember UpdateProjectMember(NSProjectMember projectMember)
Parameters
Returns
Examples
NSProjectAgent agent;
NSProjectMember projectMember;
NSProjectMember res = agent.UpdateProjectMember(projectMember);
ValidateProjectEntity(NSProjectEntity)
Checks that entity is ready for saving, return error messages by field.
Declaration
Map ValidateProjectEntity(NSProjectEntity projectEntity)
Parameters
Returns
Examples
NSProjectAgent agent;
NSProjectEntity projectEntity;
Map res = agent.ValidateProjectEntity(NSProjectEntity);