Attach several designer documents to an E-Mail
Hello at all,
We have the request that several documents should be attached to one E-Mail, and I don't know how to go on with that.
Customer Service is printing all documents for the warehouse.
These documents are:
The Sales Order itself (By Coresuite Designer)
The Warehouse Instruction (by Coresuite Designer)
The Packing List (by Coresuite Designer)
The Customs Invoice (by Coresuite Designer)
The BOL (by Coresuite Designer)
Certificates of Analysis (by pdf from filesystem)
MSDS (Material Safety Data Sheets) (by pdf from file System)
Now, how to attach documents (pdf) when they are saved on the Network is clear (LD.AddAttachment(filename)). These documents are in our case the COA's and the MSDS's.
But the other documents are created directly from SAP B1.
SO, Warehouse Inst., Packing List and Customs Invoice are usually printed from the sales order screen. A UDF is telling the coresuite designer which document to print.
In detail, we have one printdef for sales order with 1 layoutdef. In this printdef, depending on what value is set in a special UDF, we print one of these 4 documents.
Meaning, if the UDF is set to sales order, the sales order is printed. Then if I change to packing list, update, print... the packing list is printed. All based on the SAP B1 Sales Order.
Now the problem is: I know how to print all of them in one round. (Function Button, LayoutHelper.LayoutOpener.ExecutePrintdef...'UDF Value').
But, and here is the problem: How can I attach these documents to one E-Mail ??? As soon as I press the E-Mail button on a sales order, I want to attach these 4 documents from coresuite designer in one E-Mail, and this is where I don't know how to go on at the moment. Is that possible ? If not directly, maybe it is possible to save the files as pdf in a special folder and then, use LD.AddAttachment ???
Thanks for all hints.