Solved

Report Attaching via Notification Template is not working


Userlevel 4
Badge +1

Hi all,

 

I have customized report and I wanted to attach it using notification template which is triggered by a Business event and Generic inquiry. But the issue is I am getting error saying “Object reference not set to an instance of an object”. 

Business Event History

But when I’m running report in usual way it is generating without any issue. Also I can generate that report programmatically from code side as well. 

 

I tried passing fixed parameters and passing parameters through the GI as well in notification template. however, it is not working and it always gives above error message. 

 

what can be the issue here?

icon

Best answer by charithalakshan49 1 August 2023, 20:25

View original

10 replies

Userlevel 7
Badge +12

Hi @charithalakshan49 

can you share the Notification XML report attachment here?

Share the screenshot of Report paramters?

Userlevel 4
Badge +1

@manikantad18 Thanks for the response. here they are,

DocType Parameter

 

RefNbr Parameter

 

Userlevel 7
Badge +12

Hi 

Are you passing parameter values in the template  as shown below.

We are sending the Invoice report along with Invoice confirmation email, So we need to pass the parameter values.

Userlevel 4
Badge +1

@manikantad18  Yes. I tried that as well. But it shows the same error in Business event history.

Userlevel 7
Badge +12

Hi @charithalakshan49 

Can you confirm if the email is sending with out attaching the report?

Thanks

Userlevel 4
Badge +1

Hi @manikantad18  Yes. When I remove the report attachment. it is sending without any issue. 

Userlevel 7
Badge +12

Hi @charithalakshan49 

Please share the GI Xml, Business event and report if possible.

Thanks

Userlevel 4
Badge +1

Hi @manikantad18 Thanks for being so helpful🤝.

However, I was able to resolve the issue by removing the following sorting fields from the corresponding report. I think those sorting fields are useless as they are showing as DELETED and those may have effected the report generation in notification template as well.

 

Userlevel 7
Badge +12

Hi @manikantad18 Thanks for being so helpful🤝.

However, I was able to resolve the issue by removing the following sorting fields from the corresponding report. I think those sorting fields are useless as they are showing as DELETED and those may effect the report generation in notification template as well.

 

Thank you for the Update.

I had the same experience with a business event.   The report sorting fields had a ‘DELETED’.   I removed this from report and the business event work as I needed.    

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved