Skip to main content
Solved

Exception: System.NullReferenceException: Object reference not set to an instance of an object.

  • September 2, 2022
  • 4 replies
  • 960 views

JuniSihombing
Hero (Customer)
Forum|alt.badge.img+11

in one of our NON-PROD environments (luckily :-)), we encounter issue when updating a TASK record, always get below error the first time the record is updated.  The second time the same record is updated, it doesn’t get this exception error.

 

We noticed it from mobile side.  The first update is not transferred to mobile.  After the 2nd update, then the modification is visible in mobile.

 

Server log of fist update will show this exception.  The server log 2nd update doesn’t contain this exception.


Message: The following error was encounter when attempting to export a task record with the key task_id=[task_id].

Exception:

System.NullReferenceException: Object reference not set to an instance of an object.

   at Metrix.BusinessServer.BusinessPolicies.BusObjectPolicy.AddExportColumnData(MetrixDataRow rowIn, BusObject tableMetadataIn, XmlDocument& outboundMessageInOut, XmlElement& primaryNodeInOut, XmlElement& originalNodeInOut, BusObjExport exportRowIn, List`1& columnsAddedToMessageInOut, DataRowState dataRowStateIn)

   at Metrix.BusinessServer.BusinessPolicies.BusObjectPolicy.ExportData(MetrixDataRow rowIn, BusObjExport ExportRowIn, MetrixDataRow ParentRowIn, BusObject ParentMetaDataIn)


 

Any idea how to further tracing the issue?

 

~Juni

 

 

Best answer by Saranga Amaraweera

Hi @JuniSihombing ,

Have you configured an extension table in relation to the task table? Most probably this could be a reason to generate this error while the system is trying to export data for the extension table (if table data is present). Could you check whether the extension table has been setup correctly in the metadata and whether the keys are matched with the extension table?

View original
Did this topic help you find an answer to your question?

4 replies

Saranga Amaraweera
Superhero
Forum|alt.badge.img+22

Hi @JuniSihombing ,

Have you configured an extension table in relation to the task table? Most probably this could be a reason to generate this error while the system is trying to export data for the extension table (if table data is present). Could you check whether the extension table has been setup correctly in the metadata and whether the keys are matched with the extension table?


JuniSihombing
Hero (Customer)
Forum|alt.badge.img+11
  • Author
  • Hero (Customer)
  • 133 replies
  • September 2, 2022

Hi @Saranga Amaraweera,

yes, there is extension table for TASK.

 

Here is the setup for it:

 

in TASK - Relation Def:

Do you see anything missing there? 


JuniSihombing
Hero (Customer)
Forum|alt.badge.img+11
  • Author
  • Hero (Customer)
  • 133 replies
  • September 2, 2022

To avoid the exception, apparently all the existing task-ids must be imported to the extension table.

 

I did try to insert 1 existing task-id to the extension table, and did an update on the record, didn’t get the exception error.

 


JuniSihombing
Hero (Customer)
Forum|alt.badge.img+11
  • Author
  • Hero (Customer)
  • 133 replies
  • September 2, 2022

Thanks for the hint, @Saranga Amaraweera!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings