Skip to main content
Answer

Email Notifications - Object reference not set to an instance

  • June 24, 2022
  • 6 replies
  • 385 views

brendan91
Semi-Pro III
Forum|alt.badge.img+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.”

 

 

 

Best answer by Vinay Koppula

@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.

6 replies

Dioris Aguilar
Jr Varsity I
Forum|alt.badge.img+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.


brendan91
Semi-Pro III
Forum|alt.badge.img+1
  • Author
  • Semi-Pro III
  • June 25, 2022

@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)

 

 


Ahmed
Varsity II
Forum|alt.badge.img+1
  • Varsity II
  • June 26, 2022

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

Also try the other troubleshooting steps listed here:
 

 


brendan91
Semi-Pro III
Forum|alt.badge.img+1
  • Author
  • Semi-Pro III
  • June 28, 2022

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.

 


Vinay Koppula
Semi-Pro II
Forum|alt.badge.img+1
  • Semi-Pro II
  • Answer
  • June 28, 2022

@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.


brendan91
Semi-Pro III
Forum|alt.badge.img+1
  • Author
  • Semi-Pro III
  • July 2, 2022

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