Show / Hide Table of Contents

Class NSPhoneListAgent

Collection of all services for searching for person or contact (company) phone numbers.

Syntax
Examples
NSPhoneListAgent agent;
agent.callMethod(arg1, arg2);

Constructors

NSPhoneListAgent()

Collection of all services for searching for person or contact (company) phone numbers.

Introduced or updated in version: 7

Declaration
NSPhoneListAgent
Examples
NSPhoneListAgent agent;
agent.callMethod(arg1, arg2);

Methods

AddToFavorites(Integer)

Adds a new contact to the history/favorites. If the contact already existed in the history, it isn't added but the rank is updated.

Introduced or updated in version: 7

Declaration
Integer AddToFavorites(Integer contactId)
Parameters
Type Name Description
Integer contactId
Returns
Type Description
Integer

The rank of the new history item.

Examples
NSPhoneListAgent agent;
Integer contactId;
Integer res = agent.AddToFavorites(contactId);

GetContactPhones(Integer)

Returns an array of phone list items for all the persons belonging to a contact (company).

Introduced or updated in version: 7

Declaration
NSPhoneListItem[] GetContactPhones(Integer contactId)
Parameters
Type Name Description
Integer contactId

must be a valid contact Id.

Returns
Type Description
NSPhoneListItem[]
Examples
NSPhoneListAgent agent;
Integer contactId;
NSPhoneListItem[] res = agent.GetContactPhones(contactId);

GetDepartmentPhones(Integer)

Returns an array of phone list items with the in-parameter as restriction.

Introduced or updated in version: 7

Declaration
NSPhoneListItem[] GetDepartmentPhones(Integer departmentId)
Parameters
Type Name Description
Integer departmentId

must be a valid department ID (UserGroupId).

Returns
Type Description
NSPhoneListItem[]
Examples
NSPhoneListAgent agent;
Integer departmentId;
NSPhoneListItem[] res = agent.GetDepartmentPhones(departmentId);

GetFavoritesPhones()

Returns an array of phone list items with the Contacts in the users favorites dropdown list.

Introduced or updated in version: 7

Declaration
NSPhoneListItem[] GetFavoritesPhones()
Returns
Type Description
NSPhoneListItem[]
Examples
NSPhoneListAgent agent;
NSPhoneListItem[] res = agent.GetFavoritesPhones();

GetPreferences()

Gets Phone List Preferences from the CRM 5 user preferences

Introduced or updated in version: 7

Declaration
NSPhoneListPreferences GetPreferences()
Returns
Type Description
NSPhoneListPreferences
Examples
NSPhoneListAgent agent;
NSPhoneListPreferences res = agent.GetPreferences();

Search(String)

Searches the phone list using default search preferences or the preferences already set by the NSPhoneListPreferences Service

Introduced or updated in version: 7

Declaration
NSPhoneListItem[] Search(String searchString)
Parameters
Type Name Description
String searchString
Returns
Type Description
NSPhoneListItem[]
Examples
NSPhoneListAgent agent;
String searchString;
NSPhoneListItem[] res = agent.Search(searchString);

SearchWithPreferences(String,NSPhoneListPreferences)

Searches the phone list based on the supplied preferences.

Introduced or updated in version: 7

Declaration
NSPhoneListItem[] SearchWithPreferences(String searchString, NSPhoneListPreferences preferences)
Parameters
Type Name Description
String searchString
NSPhoneListPreferences preferences
Returns
Type Description
NSPhoneListItem[]
Examples
NSPhoneListAgent agent;
String searchString;
NSPhoneListPreferences preferences;
NSPhoneListItem[] res = agent.SearchWithPreferences(searchString, preferences);

SetPreferences(NSPhoneListPreferences)

Sets Phone List Preferences to the CRM 5 user preferences

Introduced or updated in version: 7

Declaration
Void SetPreferences(NSPhoneListPreferences preferences)
Parameters
Type Name Description
NSPhoneListPreferences preferences
Returns
Type Description
Void
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top