Class NSRelationAgent
Contact/Person relations.
Syntax
Examples
NSRelationAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSRelationAgent()
Contact/Person relations.
Declaration
NSRelationAgent
Examples
NSRelationAgent agent;
agent.callMethod(arg1, arg2);
Methods
CreateDefaultContactRelationEntity()
Sets default values into a new NSContactRelationEntity.
Declaration
NSContactRelationEntity CreateDefaultContactRelationEntity()
Returns
Type | Description |
---|---|
NSContactRelationEntity |
Remarks
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Examples
NSRelationAgent agent;
NSContactRelationEntity thing = agent.CreateDefaultContactRelationEntity();
thing = agent.SaveContactRelationEntity(thing);
DeleteContactRelation(Integer)
Deletes the specified contact relation.
Declaration
Void DeleteContactRelation(Integer contactRelationEntityId)
Parameters
Type | Name | Description |
---|---|---|
Integer | contactRelationEntityId |
Returns
Type | Description |
---|---|
Void |
Examples
NSRelationAgent agent;
agent.callMethod(arg1, arg2);
GetContactRelationEntity(Integer)
Gets an NSContactRelationEntity object.
Declaration
NSContactRelationEntity GetContactRelationEntity(Integer contactRelationEntityId)
Parameters
Type | Name | Description |
---|---|---|
Integer | contactRelationEntityId |
Returns
Type | Description |
---|---|
NSContactRelationEntity |
Examples
NSRelationAgent agent;
NSContactRelationEntity thing = agent.GetContactRelationEntity(123);
SaveContactRelation(NSContactRelationEntity)
Creates a new or updates an existing contact relation.
Declaration
NSContactRelationEntity SaveContactRelation(NSContactRelationEntity contactRelationEntity)
Parameters
Type | Name | Description |
---|---|---|
NSContactRelationEntity | contactRelationEntity |
Returns
Type | Description |
---|---|
NSContactRelationEntity |
Examples
NSRelationAgent agent;
NSContactRelationEntity contactRelationEntity;
NSContactRelationEntity res = agent.SaveContactRelation(contactRelationEntity);