on 04-24-2017 2:20 PM
Hi Everybody,
Scenario: If sales order release, send a mail (Custom development) to the group of people.
Mail Content:
Body: <Content>
Attachment: If you click preview button in a sales order screen, the standard Sales order confirmation form will open. The same pdf need to send as an attachment.
Sample Code:
//Add attachment 2(pdf)
var FormTemplateLanguage = "E";
var PDF : BinaryObject;
var FormTemplateCode : OutputRequestFormTemplateCode;
FormTemplateCode.content = "C0001"; //Code is Form Template Header Code
// Reuse Service Call
PDF = OutputManagementUtilities.GetPDF(this, FormTemplateCode,"EN");
if (!PDF.content.IsInitial())
{
docName = "Sales_Order" ;
doctype.content = "10001";
binaryObject = PDF;
instEmailAttFld.CreateFile(doctype, docName, docAltName, docDesc, binaryObject);
}
The PDF.content will be empty.
How to send a mail with a standard document? Please help me to solve the issue.
Regards
Sankaran A
Hello Sankaran,
Did you had a look at Allesandro's post ?
In the lower part Christine asked a question about adding PDFs to the e-mail.
HTH,
. Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Horst,
Thank you so much for your response.
I able to send a mail with attachment.
But I need to know what is the FormTemplateCode for standard Confirmation Sales Order Form.
I have to send a mail with standard form document.
FormTemplateCode.content ="What is the form template code for Confirmation SO Form template";
I tried above code. But it is returning empty PDF. Is there any issue?
Regards,
Sankaran
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.