Skip to main content
Solved

Can you change filename of the pdf attached to the emails sent via event actions?


Thanushi Jayaweera
Superhero (Employee)
Forum|alt.badge.img+15

Hi All,

We have an event action that emails the customers the customer order invoice report.
 


 

When IFS attaches the invoice report pdf file, the file name has numbers that I think are random and has nothing to do with the invoice number. The number does not mean anything to us and our customers.

Question: Is there a way to replace this number on the invoice filename with the real invoice number?

 

The filename has a random number that is not related to the invoice number.

Best answer by Rusiru Dharmadasa

Earlier it was not possible. But from APP8 LCS solution 215222 there was a framework feature introduced a new parameter called &PDF_FILE_NAME. The underline report code (RPI) can set the value to this parameters and then if the event action is created by using this parameter instead of &PDF_FILE under the “attach files” this name will be used. 

 

It is required to have this framework patch installed + the relevant product team’s report (RPI) has set a proper value (invoice number in your case) to this parameter. With this you can achieve your requirement by setting &PDF_FILE_NAME into the “attach files” box in event action. 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

8 replies

Forum|alt.badge.img+19
  • Superhero (Employee)
  • 1021 replies
  • January 5, 2022

Hi, 

In my testing - I get different results. My file name is the invoice number. 

You can also include the parameter 6 with the email sting such as the subject. 

Is that file number the preliminary invoice number by any chance? 

Based on what I see, yes it is possible that the file name include the invoice number. It’s not due to the event, the event sends the PDF, another process creates the PDF. 

 

Best regards, 

Thomas


Rusiru Dharmadasa
Superhero (Employee)
Forum|alt.badge.img+19

Earlier it was not possible. But from APP8 LCS solution 215222 there was a framework feature introduced a new parameter called &PDF_FILE_NAME. The underline report code (RPI) can set the value to this parameters and then if the event action is created by using this parameter instead of &PDF_FILE under the “attach files” this name will be used. 

 

It is required to have this framework patch installed + the relevant product team’s report (RPI) has set a proper value (invoice number in your case) to this parameter. With this you can achieve your requirement by setting &PDF_FILE_NAME into the “attach files” box in event action. 


Forum|alt.badge.img+7
  • Do Gooder (Customer)
  • 40 replies
  • January 6, 2022

Hello Rusiru, 

How do you set the invoice number to the &PDF_FILE_NAME parameter?

Thanks

 


Rusiru Dharmadasa
Superhero (Employee)
Forum|alt.badge.img+19

Hi @brantmb ,

 

That needs to be done at the code level - by modifying the corresponding report definition RDF file of the report. 


dsj
Superhero (Partner)
Forum|alt.badge.img+22
  • Superhero (Partner)
  • 836 replies
  • January 7, 2022
Rusiru Dharmadasa wrote:

Hi @brantmb ,

 

That needs to be done at the code level - by modifying the corresponding report definition RDF file of the report. 

 

You can change the file name inside the event action when using PLSQL event action type :sunglasses:

Here’s a code snippet to do that

declare
  attach_modified_ VARCHAR2(32000);
begin

  attach_modified_ := REPLACE('&PDF_FILE','&PDF_FILE_NAME','modified_text.pdf');

  Command_SYS.Mail(from_user_name_ => '&REPLY_TO_USER', 
                   to_user_name_   => '&PDF_PARAMETER_1', 
                   text_           => 'your mail content',                    
                   attach_         => attach_modified_,
                   cc_             => '' ,
                   subject_        => 'test mail from IFS');
end;

 

Cheers!

Damith


Forum|alt.badge.img+7
  • Do Gooder (Customer)
  • 40 replies
  • January 7, 2022

All, 

Rusiru Dharmadasa wrote:

Hi @brantmb ,

 

That needs to be done at the code level - by modifying the corresponding report definition RDF file of the report. 

---------------------------------------------------------------------------------------------------------------------------------------------------

 

How can this be accomplished by modifying the RDF?   Can you provide an example? 

 


Forum|alt.badge.img+5
  • Do Gooder (Customer)
  • 11 replies
  • January 26, 2022

Hi @Rusiru Dharmadasa

You mentioned that a framework patch must be installed in IFS v8. Is this patch already available in IFS version 10 and IFS Cloud?  Thanks.


Rusiru Dharmadasa
Superhero (Employee)
Forum|alt.badge.img+19

Hi @tnamarcela, Yes. this is already included. 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings