Constructors
NSPersonAgent()
Methods
AddBounce(String)
Adds a bounce count on the email address if it existsAddBounceWithCount(String,Integer)
Adds a number of bounce counts on the email address if it existsAddEmailAddressToPerson(Integer,String,Bool)
Sets the primary email address on person, possibly re-ranking email addresses accordingly.ChangeCountry(NSPersonEntity,Integer)
Changes country and regenerates the default values and localized information such as phone number and address format for this entity.ChangePersonRank(Integer,Bool)
Moves one person up or down in the ranking in the Person Archive, if possible. Corresponds to the move up/move down functions in the person archive in the contact panel.The person record that has rank = 1 is the primary contact for a company, and is the one used in situations where no person has been explicitly chosen (such as in selections).This method always affects two records.
CheckTemporaryKey(String)
Checks a temporary key for validity, and in case it is valid, return its domain, targetId and personIdCreateDefaultByContactId(Integer)
Creates an NSPersonEntity with default values based on the contactId.CreateDefaultConsentPerson()
Sets default values into a new NSConsentPerson.NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
CreateDefaultFromCredential(Integer,String,String,String)
Creates an NSPersonEntity with default values based on the contactId and credentials.CreateDefaultPersonEntity()
Sets default values into a new NSPersonEntity.NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
CreateTemporaryKey(Integer,Integer,Integer)
Creates a temporary key in the database from the given parameters and return the key string. Used for temporary keys for accessing customer centric functionality, such as UpdateSubscriptions.DeleteConsentPerson(Integer)
Deletes the NSConsentPersonDeleteExpired()
Trigger deletion of persons that has been (soft) deleted and have timed out the expiry period (the SoftDeleteRetention preference).DeletePersonEntity(Integer)
Deletes the NSPersonEntityDeleteTemporaryKeysOfDomain(Integer,Integer)
Deletes all temporary keys for a given domain and personGetAddress(Integer)
Gets the person’s localized addressGets the person’s localized address.GetAddressByCountry(Integer,Integer)
Gets the person’s localized addressGets the person’s localized address.GetBestSoLanguageForTemplate(Integer,Integer)
Gets the best language for this person on this templateGetColleagues()
Gets the persons working in the same company as the logged-on user.GetColleaguesByDepartment(Integer)
Gets the persons working in a specific department in the same company as the logged-on userDepartments can be retrieved with the PhoneList.DepartmentList service.
GetColleaguesBySource(Integer,Integer)
Gets the persons working in the same company as the logged-on user.The list of persons could be retrieved from the history list, the diary view list, or from all sources.
GetConsentInfos(Integer)
Gets all consent information for a given person. May include withdrawn consents (check)GetConsentPerson(Integer)
Gets an NSConsentPerson object.GetMyOwner()
Gets the owner of the logged in person.GetMyPerson()
Gets the person info belonging to the currently logged-on user.GetOwnerOnPersonId(Integer)
Gets the owner of the person by ID.GetPerson(Integer)
Gets an NSPerson object.GetPersonEntity(Integer)
Gets an NSPersonEntity object.GetPersonImage(Integer)
Returns the person image that is displayed in the CRM application.GetPersonList(Integer[])
Gets an array of NSPerson objects.GetPersonsFromContact(Integer)
Returns all the persons belonging to a contact.GetPersonsFromProject(Integer)
Returns all the persons belonging to a project.GetPersonSummary(Integer,Integer)
Gets summary of person and recent activity.GetPhones(Integer)
Returns all phones that belong to a person, ordered by the phone type.GetSalesRep(String,String,String,String,String)
Returns the sales representative for an external user.If this method is accessed with anonymous authentication the external user is recognized by contact and name, or by email, or phone number.If the external user is recognized as an CRM5 user (internal or external) the input fields can be left blank.
HasConsent(Integer,String)
Checks if consent has been given by a specified person, for a specific purpose. Withdraw consents return FALSE.IsNumberValid(Integer,String)
Checks if the number is unique or required.The setting is configured from admin under system options.
Merge(Integer,Integer,DateTime,Bool,Bool)
Merges two persons. The destination person will remain. You must specify the date after which activities will be moved along with the person.Move(Integer,Integer,DateTime)
Moves a person to a specified contact. You must specify the date after which activities will be moved along with the person.NormalizeRanks(Integer)
Normalize the ranks for all persons that belong to a contact. This means that the persons will be sorted according to their current rank values, and the ranks will be made monotonically increasing from 1.RemoveConsent(Integer,String)
Turns off consent for a specified person and purpose.ResolvePersonFromInfo(Integer,String,String[],String[])
Gets a person from the provided information. If the person does not exist, it will be created on demand.SaveConsentPerson(NSConsentPerson)
Updates the existing NSConsentPerson or creates a new NSConsentPerson if the id parameter is 0SavePersonEntity(NSPersonEntity)
Creates or updates an NSPersonEntityUpdates the existing NSPersonEntity or creates a new NSPersonEntity if the ID parameter is 0.SendConsentConfirmationEmail(Integer,String,Integer,Integer,String)
Sends a confirmation email to the provided person, email address (id), using the document templateSetConsent(Integer,String,String,String,String)
Sets a specified type of consent on the person.SetPersonImage(Integer)
Stores the person image that is displayed in the CRM application.SetPersonRank(Integer,Integer)
Directly sets the rank field of a person record, adjusting all other person records under the same contact as needed.May affect multiple records, potentially all person records belonging to one contact.You must have write access for to affected records for this method to succeed.