Skip to main content

Hello,

I writed a code block for auto-send mail to some users with a spesific layout and schema. So its working.

But i want to change file name of the pdf, tried to some ways but the problem still going on. Can somebody help to fix this.

 

Actually i dont know what should i use for the syntax to attach_ parameter. When i remove ‘###’ in the code this mechanism does not work for some how.

I want to use this like this:

attach_ := supplier_info_api.get_name(purchase_order_api.get_vendor_no(order_no_))||’ - ’||order_no_;

 

         attach_ := '###'||Pdf_Archive_API.Get_Id(result_key_,print_job_id_)||'###'||to_char(print_job_id_)||'###'||to_char(result_key_)||'###' ;
         text_   :=                                         
                                           '<br/>'||'Dear Sir/Madam,'||
                       '<br/>'||'We kindly request ,the products which are in our Purchase Order with the attached details must be delivered to the factory '||'<u><b>'||'on the specified dates.'||'</u></b>'||
                       '<br/>'||'<u><b>'||'Please confirm the arrival dates in a day.'||'</u></b>'||
                                           '<br/>'||'Best Regards.';
         
         Command_SYS.Mail(


            from_user_name_ => 'IFSAPP',
            to_user_name_ => to_,
            text_ => text_ ,
            attach_ => attach_,
            subject_ => subject_,
            from_alias_ => company_ ||' - IFS 10');

 

Hi @0guz,

I hope the below post will be helpful.

 

Kind regards,

Shanuka.


Hi @Shanuka Lashan Thank you for reaction. Actually I saw that topic but i need code level modification instead of an event from the IFS.

Maybe i could not understand clearly idk :/

 

There is using &PDF_FILE and &PDF_FILE_NAME but i am creating result key in the code level.


I solved the problem. For future just use attachs_ parameter like below;

attach_ := '###'||Pdf_Archive_API.Get_Id(result_key_,print_job_id_)||'###'||to_char(print_job_id_)||'###'||to_char(result_key_)||'###'||supplier_info_api.Get_Name(purchase_order_api.Get_Vendor_No(order_no_))||' - '||order_no_||'.pdf'||'###' ;