PublicAPI.CRM.RelationshipELMA API Documentation
Relationships
Access path: PublicAPI.CRM.Relationship
Methods

  NameDescription
Public methodAddAuthorPermission
Grant the author permission for the contractor
Public methodAddComment(Relationship, String)
Add a comment to the relationship
Public methodAddComment(Relationship, String, User)
Public methodAddPermission(Relationship, OrganizationItem, Permission)
Grant permissions for a contractor to a job position
Public methodAddPermission(Relationship, User, Permission)
Grant a user permissions for a contractor
Public methodAddPermission(Relationship, UserGroup, Permission)
Grant a user group permissions for a contractor
Public methodCompleteRelationship
Complete Relationship
Public methodCount 
Returns the total number of objects of this type
Public methodCount(IEntityFilter)
Get Total Number of Objects by Filter
Public methodCreate
Create New Entity (without a Database entry)
Public methodCreateCall 
Create Call. Creates an object without saving to the database
Public methodCreateCall(Contact)
Create Call for a contact. (Creates an object without saving to the database)
Public methodCreateCall(Contractor)
Create Call for a contractor. Creates an object without saving to the database
Public methodCreateCall(Lead)
Create Call for a lead. Creates an object without saving to the database
Public methodCreateCall(Sale)
Create Call for a sale. Creates an object without saving to the database
Public methodCreateMail 
Create Mail. Creates an object without saving to the database
Public methodCreateMail(Contact)
Create Mail for a contact. Creates an object without saving to the database
Public methodCreateMail(Contractor)
Create Mail for a contractor. Creates an object without saving to the database
Public methodCreateMail(Lead)
Create Mail for a lead. Creates an object without saving to the database
Public methodCreateMail(Sale)
Create Mail for a sale. Creates an object without saving to the database
Public methodCreateMeeting 
Create Meeting. Creates an object without saving to the database
Public methodCreateMeeting(Contact)
Create Meeting for a contact. Creates an object without saving to the database
Public methodCreateMeeting(Contractor)
Create Meeting for a contractor. Creates an object without saving to the database
Public methodCreateMeeting(Lead)
Create Meeting for a lead. Creates an object without saving to the database
Public methodCreateMeeting(Sale)
Create Meeting for a sale. Creates an object without saving to the database
Public methodDelete
Delete Object
Public methodDeleteAuthorPermission
Remove permissions for a contractor from the author
Public methodDeletePermission(Relationship, OrganizationItem)
Remove all permissions for a contractor from a job position
Public methodDeletePermission(Relationship, User)
Remove all the permissions for a contractor from a user
Public methodDeletePermission(Relationship, UserGroup)
Remove all the permissions for a contractor from a user group
Public methodDeletePermission(Relationship, OrganizationItem, Permission)
Remove permissions for a contractor from a job position
Public methodDeletePermission(Relationship, User, Permission)
Remove permissions to manage a contractor from a user
Public methodDeletePermission(Relationship, UserGroup, Permission)
Remove permissions to manage a contractor from a user
Public methodDisableInheritPermissions
Disable inheriting permissions from category
Public methodEnableInheritPermissions
Enable inheriting permissions from a category
Public methodFilter
Creates an assistant for working with the "Relationship" object filter
Public methodFind(FetchOptions)
Find objects according to fetch options
Public methodFind(String)
Find objects according to the filter in the EQL language
Public methodFind(IEntityFilter, FetchOptions)
Fing objects according to fetch options and filter
Public methodFindByIdArray
Find All Objects by Array IDs
Public methodIsDirty
Check, if there are unsaved changes in the object
Public methodIsNew
Check, if the object is new (not saved in the database)
Public methodLoad(Guid)
Load by UID. If not found, an exception is invoked
Public methodLoad(Int64)
Load by ID. If not found, an exception is invoked
Public methodLoadOrCreate(Guid)
Load by ID. If not found, the new object is returned
Public methodLoadOrCreate(Int64)
Load by ID. If not found, the new object is returned
Public methodLoadOrNull(Guid)
Load by UID. If not found, null is returned
Public methodLoadOrNull(Int64)
Load by ID. If not found, null is returned
Public methodRefresh
Refresh (read over) Object from Database
Public methodSave
Save Object to Database
Back to Top
Properties

  NameDescription
Public propertyTypeUid
Returns the unique object identifier "Relationship"
Back to Top
Remarks

Section containing methods for managing relationships
Examples

Create a relationship for the contractor created here. Create a meeting for example.

var myMeeting = PublicAPI.CRM.Relationship.CreateMeeting(myContractor);

Before operations with variable myMeeting, fill its required fields

//Meeting subject
myMeeting.Theme = "Meetinng with New World LLC";

//Meeting start date 15:00 15.02.2014
myMeeting.StartDate = new DateTime(2014, 02, 15, 15, 00, 00);

//You can skip the meeting end date; by default it is the meeting start date + 15 minutes 
//If 15 minutes is not enough, fill field 'End date' manually 
//Meeting end date 16:00 15.02.2014
myMeeting.EndDate = new DateTime(2014, 02, 15, 16, 00, 00);

//context.RelationshipUsers - list of meeting participants, list IRelationshipUser 
//presenting the following fields to fill 
//User - type User - system user 
//Status - type RelationshipStatus - enumeration 
//Relationship - state your relationship
myMeeting.RelationshipUsers = context.RelationshipUsers;

Add a comment to your meeting

PublicAPI.CRM.Relationship.AddComment(myMeeting, "myMeeting a meeting created for contractor myContractor");

Please save the object in the base to ensure its proper functioning

myMeeting.Save();

See Also