Interface IPhoneListAgent
Interface for the PhoneList Agent Collection of all services for searching for person or contact (company) phone numbers.
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("PhoneList Agent", "Interface for the PhoneList Agent. Collection of all services for searching for person or contact (company) phone numbers.")]
public interface IPhoneListAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (PhoneListAgent agent = new PhoneListAgent())
{
// call methods on agent here...
}
}
Methods
AddToFavorites(Int32)
Adds a new contact to the history/favorites. Returns the rank of the new history item. If the contact already existed in the history, it isn't added but the rank is updated.
Declaration
int AddToFavorites(int contactId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | contactId | The contact id |
Returns
Type | Description |
---|---|
Int32 | The rank of the history item |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (PhoneListAgent agent = new PhoneListAgent())
{
// call methods on agent here...
}
}
GetContactPhones(Int32)
Returns an array of phone list items for all the persons belonging to a contact (company). The in-parameter must be a valid contact-id.
Declaration
PhoneListItem[] GetContactPhones(int contactId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | contactId | The contact id |
Returns
Type | Description |
---|---|
PhoneListItem[] | The contacts phone list. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (PhoneListAgent agent = new PhoneListAgent())
{
// call methods on agent here...
}
}
GetDepartmentPhones(Int32)
Returns an array of phone list items with the in-parameter as restriction. The in-parameter must be a valid department id (UserGroupId).
Declaration
PhoneListItem[] GetDepartmentPhones(int departmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | departmentId | The department to get the phone list for |
Returns
Type | Description |
---|---|
PhoneListItem[] | The department phone list |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (PhoneListAgent agent = new PhoneListAgent())
{
// call methods on agent here...
}
}
GetFavoritesPhones()
Returns an array of phone list items with the Contacts in the users favorites dropdown list.
Declaration
PhoneListItem[] GetFavoritesPhones()
Returns
Type | Description |
---|---|
PhoneListItem[] | The favorite contact phone list |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (PhoneListAgent agent = new PhoneListAgent())
{
// call methods on agent here...
}
}
GetPreferences()
Getting Phone List Preferences from the CRM 5 user preferences
Declaration
PhoneListPreferences GetPreferences()
Returns
Type | Description |
---|---|
PhoneListPreferences | The Phone List Preferences |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (PhoneListAgent agent = new PhoneListAgent())
{
// call methods on agent here...
}
}
Search(String)
Searching the phone list. Using default search preferences or the preferences already set by the PhoneListPreferences Service
Declaration
PhoneListItem[] Search(string searchString)
Parameters
Type | Name | Description |
---|---|---|
String | searchString | The search string |
Returns
Type | Description |
---|---|
PhoneListItem[] | The resulting phone list |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (PhoneListAgent agent = new PhoneListAgent())
{
// call methods on agent here...
}
}
SearchWithPreferences(String, PhoneListPreferences)
Searching the phone list. Search is based on the supplied preferences.
Declaration
PhoneListItem[] SearchWithPreferences(string searchString, PhoneListPreferences preferences)
Parameters
Type | Name | Description |
---|---|---|
String | searchString | The search string. |
PhoneListPreferences | preferences | The search preferences |
Returns
Type | Description |
---|---|
PhoneListItem[] | The resulting phone list. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (PhoneListAgent agent = new PhoneListAgent())
{
// call methods on agent here...
}
}
SetPreferences(PhoneListPreferences)
Setting Phone List Preferences to the CRM 5 user preferences
Declaration
void SetPreferences(PhoneListPreferences preferences)
Parameters
Type | Name | Description |
---|---|---|
PhoneListPreferences | preferences | The preference that is set as user preferences |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (PhoneListAgent agent = new PhoneListAgent())
{
// call methods on agent here...
}
}