public RelationshipMail CreateMail( Contractor contractor )
Create Mail for a contractor.
Creates an object without saving to the database
Syntax
public RelationshipMail CreateMail( Contractor contractor )
Parameters
- contractor
- Type: Contractor
Contractor, the mail is created for. Object. Access path: PublicAPI.CRM.Contractor
Return Value
Type: RelationshipMailExamples
//load a contractor by ID var contractor = PublicAPI.CRM.Cjntractor.Load(3); //create mail var myMail = PublicAPI.CRM.Relationship.CreateMail(contractor); //myMail - created mail //WARNING!! Mail is created without a name. For correct work with the mail, you should //specify its name and sabe the object to the database myMail.Theme = "Mail Name"; myMail.Save();
See Also