DEV Community

Emmanuel Fiadufe
Emmanuel Fiadufe

Posted on • Edited on

Object reference not set to an instance of an object.

Any help please

Top comments (4)

Collapse
 
emmanuel_fiadufe_6b7d3037 profile image
Emmanuel Fiadufe

Hello team,
The data only get saved in sales table and the SalesItems table is empty, I used the breaking point but it didn't point out any specific errors,
The error occurred on the loop

Collapse
 
emmanuel_fiadufe_6b7d3037 profile image
Emmanuel Fiadufe

The profit and the tax are not calculating it value

Collapse
 
luge profile image
LuGe

Chatgpt is saying the following to your problem:

The specific error most likely arises when the ObjSalesModel or its tblSales property is null.

Collapse
 
luge profile image
LuGe

Hey Emmanuel , you can debug the code and go line by line an after the line with the null object is passed it will throw the error so you know then