PublicAPI.CRM.ContactELMA API Documentation
Contact
Access path: PublicAPI.CRM.Contact
Methods

  NameDescription
Public methodAddAuthorPermission
Grant the author permission for the contractor
Public methodAddComment(Contact, String)
Add a comment to the contact
Public methodAddComment(Contact, String, User)
Public methodAddPermission(Contact, OrganizationItem, Permission)
Grant permissions for a contractor to a job position
Public methodAddPermission(Contact, User, Permission)
Grant a user permissions for a contractor
Public methodAddPermission(Contact, UserGroup, Permission)
Grant a user group permissions for a contractor
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 methodCreate(Contractor)
Create a contact for the contractor. Creates an object without saving to the database
Public methodDelete
Delete Object
Public methodDeleteAuthorPermission
Delete permission for a contractor from the author
Public methodDeletePermission(Contact, OrganizationItem)
Remove all permissions for a contractor from a job position
Public methodDeletePermission(Contact, User)
Remove all the permissions for a contractor from a user
Public methodDeletePermission(Contact, UserGroup)
Remove all the permissions for a contractor from a user group
Public methodDeletePermission(Contact, OrganizationItem, Permission)
Remove permissions for a contractor from a job position
Public methodDeletePermission(Contact, User, Permission)
Remove permissions to manage a contractor from a user
Public methodDeletePermission(Contact, 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 "Contact" 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 "Contact"
Back to Top
Remarks

Section containing methods for managing contacts
Examples

Create a contact for the contractor, createdhere

//This method will create a contact, tied to a contractor 
var myContact = PublicAPI.CRM.Contact.Create(myContractor);

Before you start working myContact variable, fill in its required fields

//Contact Name
myContact.Firstname = "John";
//Contact Last Name
myContact.Surname = "Smith";
//Contact Middle Name
myContact.Middlename = "James";

Add a comment to the contact

PublicAPI.CRM.Contact.AddComment(myContact, "myContact is a contact, created for myContractor");

Remember to save the object to the database for its correct operation

myContact.Save();

See Also