Solved

Is There Any Way To Change Attached PDF File Name On E-Mails?

  • 17 February 2022
  • 3 replies
  • 332 views

Userlevel 4
Badge +10
  • Hero (Employee)
  • 60 replies

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');

 

icon

Best answer by 0guz 17 February 2022, 19:36

View original

This topic has been closed for comments

3 replies

Userlevel 5
Badge +12

Hi @0guz,

I hope the below post will be helpful.

 

Kind regards,

Shanuka.

Userlevel 4
Badge +10

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.

Userlevel 4
Badge +10

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'||'###' ;