Solved

Email Notifications - Object reference not set to an instance

  • 24 June 2022
  • 6 replies
  • 251 views

Userlevel 5
Badge +1

I’ve been struggling with creating business events to trigger an email, and I’ve come to the conclusion that building a GI specific to the email is probably my best bet, but unfortunately it is not working for me.

I created the GI and have all of the fields I need  and the GI works fine.

In email notifications, I click INSERT > DATAFIELDS, find a field, then select it into the document. Adding any field results in the following error code “Object reference not set to an instance of an object.”

 

 

 

icon

Best answer by Vinay Koppula 28 June 2022, 17:46

View original

6 replies

Userlevel 5
Badge +2

@brendan91 Try to share the trace when getting the error message. You can do so in Tools > Trace at the top right of the Notification Templates screen: 
 

That will give some clue about where the error is triggered.

Userlevel 5
Badge +1

@Dioris Aguilar Thank you! other than taking issue with the generic inquiry - I don’t see what is wrong. Have any ideas?

 

6/25/2022 7:48:13 PM Error:
Object reference not set to an instance of an object.

   at PX.Data.PXGenericInqGrph.DynamicFieldsScope..ctor(PXGenericInqGrph graph)
   at PX.Data.PXGenericInqGrph.ExecuteSelect(String viewName, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
   at PX.Web.UI.PXRichTextConverter.ConvertForClientView(Object val, Page page, String dataFieldGraph, String dataFieldView, Action`2 fieldHandler, Nullable`1 wikiId)
   at PX.Web.UI.PXRichTextEdit.ExecuteCallback(PXCallbackCommand cmd, String strData)
   at PX.Web.UI.PXCallbackManager.ProcessCallbackInternal(String strData, PXCallbackExecMethod executeMethod)

 

 

Badge +1

@brendan91 Try adding all the primary key fields in the GI Results Grid for all tables.

Also try the other troubleshooting steps listed here:
 

 

Userlevel 5
Badge +1

All of the required fields were in the GI. I made a very primitive GI with no joins and I’m still getting the error. I can’t figure this out.

https://drive.google.com/file/d/1jOrwclxZhKFaDsPP4l6RPc7QuLopjdzi/view?usp=sharing

I guess I’ll make a support ticket.

 

Userlevel 5
Badge +1

@brendan91 This is an issue in Acumatica itself. What I have found here is when we add any DataFields in the editor area it is throwing an error while selecting on the Preview action. Try with simple text without the DataFields it will work. 

 

I’m assuming that the root cause of this issue there is no source of data to display in the DataFields in the Preview pane. Raise a support ticket for this. 

 

In the time being, go ahead and create the notification template without using the preview action. To review the design you created is as expected then try to review it directly in the email when BE triggers.

Userlevel 5
Badge +1

Thank you everyone. This is apparently a known issue and ignoring the error was the solution.

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