Contractor
Access path: PublicAPI.CRM.ContractorMethods
Name | Description | |
---|---|---|
AddAuthorPermission |
Grant the author permission for the contractor
| |
AddComment(Contractor, String) |
Add Comment to a contractor
| |
AddComment(Contractor, String, User) | ||
AddPermission(Contractor, OrganizationItem, Permission) |
Grant permissions for a contractor to a job position
| |
AddPermission(Contractor, User, Permission) |
Grant a user permissions for a contractor
| |
AddPermission(Contractor, UserGroup, Permission) |
Grant a user group permissions for a contractor
| |
Count |
Returns the total number of objects of this type
| |
Count(IEntityFilter) |
Get Total Number of Objects by Filter
| |
Create |
Create New Entity (without a Database entry)
| |
CreateContact |
Creates a contact, linked to the contractor.
Creates an object without saving to the database
| |
CreateSale |
Creates a sale, linked to the contractor
| |
Delete |
Delete Object
| |
DeleteAuthorPermission |
Remove permissions for a contractor from the author
| |
DeletePermission(Contractor, OrganizationItem) |
Remove all permissions for a contractor from a job position
| |
DeletePermission(Contractor, User) |
Remove all the permissions for a contractor from a user
| |
DeletePermission(Contractor, UserGroup) |
Remove all the permissions for a contractor from a user group
| |
DeletePermission(Contractor, OrganizationItem, Permission) |
Remove permissions for a contractor from a job position
| |
DeletePermission(Contractor, User, Permission) |
Remove permissions to manage a contractor from a user
| |
DeletePermission(Contractor, UserGroup, Permission) |
Remove permissions to manage a contractor from a user
| |
DisableInheritPermissions |
Disable inheriting permissions from category
| |
EnableInheritPermissions |
Enable inheriting permissions from a category
| |
Filter |
Creates an assistant for working with the "Contractor" object filter
| |
Find(FetchOptions) |
Find objects according to fetch options
| |
Find(String) |
Find objects according to the filter in the EQL language
| |
Find(IEntityFilter, FetchOptions) |
Fing objects according to fetch options and filter
| |
FindByIdArray |
Find All Objects by Array IDs
| |
IsDirty |
Check, if there are unsaved changes in the object
| |
IsNew |
Check, if the object is new (not saved in the database)
| |
Load(Guid) |
Load by UID. If not found, an exception is invoked
| |
Load(Int64) |
Load by ID. If not found, an exception is invoked
| |
LoadOrCreate(Guid) |
Load by ID. If not found, the new object is returned
| |
LoadOrCreate(Int64) |
Load by ID. If not found, the new object is returned
| |
LoadOrNull(Guid) |
Load by UID. If not found, null is returned
| |
LoadOrNull(Int64) |
Load by ID. If not found, null is returned
| |
Refresh |
Refresh (read over) Object from Database
| |
Save |
Save Object to Database
|
Properties
Name | Description | |
---|---|---|
ContractorIndividual |
Individual
| |
ContractorLegal |
Company
| |
TypeUid |
Returns the unique object identifier "Contractor"
|
Remarks
Examples
Create an empty contractor (a company)
var myContractor = PublicAPI.CRM.Contractor.ContractorLegal.Create();
Before operations with variable myContractor, fill its required fields
//name of the created contractor myContractor.Name = "New Life LLC"; //participant responsible for contractor, load administrator myContractor.Responsible = PublicAPI.Security.User.LoadOrNull(1);
add a comment to our contractor
PublicAPI.CRM.Contractor.AddComment(myContractor, "This contractor does not have contacts yet; but they will be created later");
Please save the object in the base to ensure its proper functioning
myContractor.Save();
See Also