Hi,
My requirement is to send out email upon first time saving of the lead.
However, the email is not sent out to the recipient, even though the email activity is created (see the screen shot).
Any idea?
Here is my codes in event-beforesave of the lead BO extension.
var elActivityRootEmail : elementsof Activity;
var instActivityEmail;
// Activity: define party node
var elActivityPartyEmail : elementsof Activity.Party;
var instPartyEmail;
// Activity: define text collection
var elActivityTxtCollTxtEmail: elementsof Activity.TextCollection.Text;
var elActivityTxtCollTxtCntntEmail: elementsof Activity.TextCollection.Text.TextContent;
var instActivityTxtCollEmail;
var instActivityTxtCollTxtEmail;
// Activity: define attachment folder
var elActivityAttachmDoc: elementsof Activity.AttachmentFolder.Document;
var instActivityAttachm;
instActivityEmail = Activity.CreateWithReference(this, "39");
instActivityEmail.SubjectName= "Test email";
elActivityPartyEmail.PartyName = "0001000843";
instActivityEmail.MessageToParty.Create(elActivityPartyEmail);
instActivityTxtCollEmail = instActivityEmail.TextCollection.Create();
elActivityTxtCollTxtEmail.TypeCode.content = "10002";
instActivityTxtCollTxtEmail = instActivityTxtCollEmail.Text.Create(elActivityTxtCollTxtEmail);
elActivityTxtCollTxtCntntEmail.Text.content = "Body text of the Activity Email";
instActivityTxtCollTxtEmail.TextContent.Create(elActivityTxtCollTxtCntntEmail);
instActivityEmail.Send();
cheers,
julius