send report as attachment

SOLVED

Hello,

I would like to know if it is possible to send a report (PDF) by email from sage X3 while allowing the user to personalize the email (subject, message, recipients...).

I made a script that automatically generates the invoice in pdf format to save it in a folder when the user validates an invoice. The goal here would be to send this pdf by email as well.

I was thinking of a feature similar to "mailto:" that would allow me to call an outlook window with the report attached.

Thanks in advance for your help

Parents Reply
  • 0 in reply to IsraelBraunfeld

    Thanks for your answer, indeed I deleted my question about sender because it was a mistake on my part and there was actually no problem.

    Regarding the semicolon, I did try this but I get the following message:

    Incorrect Expression
    Illegal Character

    here is my field:

    "D:\MYCOMPANY\tmp\"+"Invoice_"+[M:SIH0]NUM+".pdf";"D:\MYCOMPANY\test.txt"


Children
  • +1 in reply to N2XF3
    verified answer

    Found the solution, here is the right way to do it:


    "D:\MYCOMPANY\tmp\"+"Invoice_"+[M:SIH0]NUM+".pdf"+";"+"D:\MYCOMPANY\test.txt"

    So to put it in a nutshell,

    1) SPESIH: When an invoice is validated, the report is printed in D:\MYCOMPANY\tmp\[M:SIH0]NUM.pdf

    (AVANTBOUT is used)

    2) Worflow is called, it retrieve the PDF by "reconstructing" the file name (see the attachment field above)

    I bet there must be an easier / lighter way to retrieve the pdf ? but for now it's the best I can come up with