public Contact Create( Contractor contractor )
Create a contact for the contractor.
Creates an object without saving to the database
Syntax
public Contact Create( Contractor contractor )
Parameters
- contractor
- Type: Contractor
Contractor, the contact is created for. Object. Access path: PublicAPI.CRM.Contractor
Return Value
Type: ContactContact
Examples
//load a contractor by ID var contractor = PublicAPI.CRM.Contractor.Load(3); //create a contact var myContact = PublicAPI.CRM.Contact.Create(contractor); //myContact - created contact //WARNING!! The contact if created without a name. For correct work with the contact, you should specify its name and save the entity to the database myContact.Name = "Contact Name"; myContact.Save();
See Also