01.03.2010, 23:15 | #1 |
Участник
|
Crm 3.0: custom workflow create email from template
Добрый день,
подскажите как создать email на основе шаблона хочется вместо X++: email email = new email(); email.trackingtoken = " "; activityparty fromparty = new activityparty(); fromparty.partyid = new Lookup(); fromparty.partyid.type = EntityName.systemuser.ToString(); fromparty.partyid.Value = userId; email.from = new activityparty[] {fromparty}; activityparty toparty = new activityparty(); toparty.partyid = new Lookup(); toparty.partyid.type = EntityName.account.ToString(); toparty.partyid.Value = accountId; email.to = new activityparty[] {toparty}; email.sender = emailSender; email.subject = emailSubj; email.description = emailDesc; email.ownerid = new Owner(); email.ownerid.type = EntityName.systemuser.ToString(); email.ownerid.Value = userId; Guid emailId = service.Create(email); X++: email email = new email();
email.CopyFromTemplate(templateId);
Guid emailId = service.Create(email); |
|
Теги |
email, workflow, crm3 |
|
|