Skip to main content

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=ytask_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

 

 

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?


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? 


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.

 


Thanks for the hint, @Saranga Amaraweera!


Reply