Email Item.

TESDeveloperTESDeveloper Member Posts: 42
HI,

I'm trying to build an Email Item Record with the following code. GenerateEmailBody just returns a Text string.


EmailItem.Init;
EmailItem."From Name" := FromName;
EmailItem."From Address" := FromAddress;
EmailItem."Send to" := SendTo;
EmailItem."Send CC" := SendCC;
EmailItem."Send BCC" := SendBCC;
EmailItem.Subject := Subject;
EmailItem.SetBodyText(GenerateEmailBody(Contact));
EmailItem."Attachment File Path" := AttachmentFilePath;
EmailItem."Attachment Name" := AttachmentName;
EmailItem."Error Text" := ErrorText;
EmailItem."Plaintext Formatted" := TRUE;
EmailItem."Message Type" := EmailItem."Message Type"::"Custom Message";
EmailItem.INSERT(TRUE);

When I Debug opening after creating the record the Length of the Body is 200. Oncew I open Page 9700 Email Dialog the Body is always empty. What else is required to work.

Thanks

Answers

  • Developer101Developer101 Member Posts: 566
    where have you written the above code?
    Can you confirm of body has the text that was generated from generateemailbody?
    is only body not appearing or everything not appearing?
    United Kingdom
  • Developer101Developer101 Member Posts: 566
    you would need CALCFIELDS(body) to read to memory
    United Kingdom
Sign In or Register to comment.