Solved

Attach Documents to the Email which generates from Print Dialog

  • 10 September 2021
  • 7 replies
  • 929 views

Badge +14

Hi,

 

I want to add documents in Attachments of Purchase Order to the email which is generated from Print Dialog. 

user will enter email address from print dialog

I was able to do this in PDF_REPORT_CREATED but I want to attach documents to the mail which generates from the print dialog box (community post ).

Please let me know if someone has done this before as a configuration or as a customization.

 

Thank you in Advance!

icon

Best answer by MitDenukN 13 September 2021, 18:00

View original

This topic has been closed for comments

7 replies

Userlevel 7
Badge +28

Please check this post for report rule information to perform this function

 

Userlevel 7
Badge +16

Hi @MitDenukN ,

 

As I can see you had a community discussion few days back too. Then what is the current issue ? As per that you mentioned you were able to achieve the document attachment functionality with PDF_REPORT_CREATED. with some sql statement ?

 

I suggest you to read the report rule functionality as well. PDF attachment functionality is also there with Report rule with pdf insert property.

 http://f1web/f1docproj/apps10sp/foundation1/040_administration/250_operational_reporting/070_report_rules/

 

Badge +14

@ShawnBerk and @Dumeesha Wanigarathna ,  Thank you for your suggestion on trying report rules. I will give it a try on that way.
@Dumeesha Wanigarathna I could sent attachments using event action PDF_REPORT_CREATED and have mentioned in this post as well. But it generates a different mail. I want to attach documents to the same mail which is generating from Print Dialog.

I have created a custom event for LU ApplicationMessage and tried to add the documents to message body using following API calls:

 message_body_api.new__(info_, objid_, objversion_, attr_, 'DO');

message_body_api.write_message_value__(objversion_, objid_, file_data_);

 

But I’m getting an error because this application message is still not available in database.
That’s why I’m looking for other alternative ways to implement this.

 

Thank you again for your response.

Badge +14

As I understood, we can use PDF Inserts and setup relevant report rules if the document is a constant.

Documents which I’m trying to attach to the Email depend on each Purchase Order.
So, for this case I can’t use PDF inserts and it’s report rules as a solution :slight_frown:

@Dumeesha Wanigarathna , @ShawnBerk I really appreciate your help with suggestions. 

Badge +14

Until I find a better way, I had to go for an alternative solution. 

Send attachments from PDF_REPORT_CREATED and event action will get the Purchase Order’s Supplier contact email address. Then the email generates from Print Dialog will be blocked using Report Rules (SkipJobEmail Action Property). The Application Message which generates from Print Dialog originally goes to OUT1 queue, so created another event to change the Queue from OUT1 to TRASHCAN. There is a Scheduled Database Task to cleanup TRASHCAN application messages in every hour.

Userlevel 7
Badge +16

Hi @MitDenukN ,

 

Good you have found a workaround to avoid the additional e mail and this interesting. 

 

I too couldn’t find a way to handle your request regarding attaching ‘attachment panel ‘documents to email only by configuration. 

 

But I believe this could be achieved by a customization after doing some further analysis of the code and you may get it done with oue IFS consulting organization. I have come across an incident where customer got the attachment in customer order , work order and customer invoice to E Invoice (xml) file generated to OUT folder. However this was done by a customization.

Badge +14

Thank you @Dumeesha Wanigarathna :blush: