Interface IRelationAgent
Interface for the Relation Agent Contact/Person relations
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("Relation Agent", "Interface for the Relation Agent. Contact/Person relations")]
public interface 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...
}
}
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
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
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
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
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...
}
}