Question

Automatically send via email the RMA report


Badge +3

Dear IFS Heroes,

I want to automatically send the RMA report via email when the status gets ‘’Released’’ in IFS 9.

Usually I’m using the PDF_REPORT_CREATED event, but it’s not working for RMAs because it’s not picking up any PDF_PARAMETERS and this way I can’t send it to the correct email addresses.

Is there a way to send RMA pdf reports automatically to the correct email addresses?

Thank you,

RM


10 replies

Userlevel 7
Badge +19

Hi @rmonov ,

 

Could you please let us know what is the IFS version you are using?

Badge +3

Hi @Minoshini Fonseka ,

It’s IFS Applications 9.

Userlevel 7
Badge +19

Hi RM,

 

You should be able to do this by creating a custom event for the RMA report. 

 

Refer to following path in your technical documentation for more information: .../040_administration/240_integration/320_events/default.htm

 

Create a new custom event for the corresponding table. Next add a new event action for this custom event of type email and setup it as per your requirements. 

 

 

Badge +3

Hi @Rusiru,

I already tried that and this way I can build/send confirmation email but this email will not include the actual RMA pdf report, am I missing something?

Userlevel 7
Badge +19

OK. what is the LU, table you are using here? Can you add a screen capture of the custom event that you have created?

Badge +3

Hi @Rusiru ,

The LU is: ReturnMaterial

The table is: RETURN_MATERIAL_TAB

The Event is:

The Event Action is:

I want to ‘”soft’ code” the attach files section to include the RMA pdf report for each released RMA No

Userlevel 5
Badge +11

I have been battling with this for a while, see this link for more information.

However, I am using IFS10 and there does seem to be a bug in the attachment process.

Userlevel 7
Badge +19

Unfortunately custom events does not seem to allow CLOB/BLOB fields. There are two solutions as I think. Write a new “Execute online SQL” type event action for the PDF_REPORT_PARAMETER event and write your own PLSQL code to send the email utilizing COMMAND_SYS.MAIL function. 

 

Otherwise you could use a report rule action as per below. You can set conditions using any fields from this REP (please check this is the correct report id first).

 

 

Next add a new action to “send email”. This has the option to include the PDF as attachment name.

 

 

Userlevel 7
Badge +19

If report rules does not work for your problem, you will have to write your own login in plsql to add the conditions and then trigger the email only if your conditions are satisfied. The &NOTES will include the rma number so that you can get the corresponding RMA from return_material_api.get method. 

 

Following command_sys.mail function will trigger an email including the PDF file.

 

begin
  -- you conditions here
  command_sys.Mail('IFSAPP',
                          'your_email@yourdomain.com',' &NOTES','', '&PDF_FILE');
commit;
end;

Badge +3

Hi @Rusiru 

Thank you for this information.

I will give it a try.

Reply