Class RelationAgent
Facade for the Relation Agent Contact/Person relations
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
public class RelationAgent : AgentBase<IRelationAgent>, IDisposable, IRelationAgent, IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (RelationAgent agent = new RelationAgent())
{
// call methods on agent here...
}
}
Constructors
RelationAgent()
Facade for the Relation Agent Contact/Person relations
Declaration
public RelationAgent()
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (RelationAgent agent = new RelationAgent())
{
// call methods on agent here...
}
}
Methods
CreateDefaultContactRelationEntity()
Loading default values into a new ContactRelationEntity. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
public ContactRelationEntity CreateDefaultContactRelationEntity()
Returns
Type | Description |
---|---|
ContactRelationEntity | New ContactRelationEntity with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (RelationAgent agent = new RelationAgent())
{
// call methods on agent here...
}
}
DeleteContactRelation(Int32)
Deletes the spesified contact relation.
Declaration
public void DeleteContactRelation(int contactRelationEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | contactRelationEntityId | Relation to delete |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (RelationAgent agent = new RelationAgent())
{
// call methods on agent here...
}
}
GetContactRelationEntity(Int32)
Gets a ContactRelationEntity object.
Declaration
public ContactRelationEntity GetContactRelationEntity(int contactRelationEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | contactRelationEntityId | The identifier of the ContactRelationEntity object |
Returns
Type | Description |
---|---|
ContactRelationEntity | ContactRelationEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (RelationAgent agent = new RelationAgent())
{
// call methods on agent here...
}
}
SaveContactRelation(ContactRelationEntity)
Creates a new or updates an existing contact relation.
Declaration
public ContactRelationEntity SaveContactRelation(ContactRelationEntity contactRelationEntity)
Parameters
Type | Name | Description |
---|---|---|
ContactRelationEntity | contactRelationEntity | Relation to save |
Returns
Type | Description |
---|---|
ContactRelationEntity | Saved relation |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (RelationAgent agent = new RelationAgent())
{
// call methods on agent here...
}
}