Class PhoneListAgent
Facade 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
public class PhoneListAgent : AgentBase<IPhoneListAgent>, IDisposable, 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...
}
}
Constructors
PhoneListAgent()
Facade for the PhoneList Agent Collection of all services for searching for person or contact (company) phone numbers.
Declaration
public PhoneListAgent()
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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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...
}
}