I am getting a NullReferenceException while trying to post a GRN. When I post a GRN without any lines it works. As soon as I specify one or more lines I get the NullReferenceException.
The following is the server side exception:
- Code: Select all
[GoodsReceivedNotePOSTRequest: 3/10/2017 11:31:16 PM]:
[REQUEST: {CreditorID:00000000JY000000000A,CreditorAccountNo:5031,SlipDate:2017-10-04T10:31:15.9890000+11:00,LogicalWarehouseID:ZZZZZZZZZZ0000000000,Reference:Received by ASPluris,Lines:[{QuantityOrdered:41.000000,OrderNo:100509,OrderLineID:063c73bccc1843a48f3b,Quantity:10,InventoryID:000000000K00000000BV,PartNo:1171,Description:Standard Keyboard - Black USB/PS2 104 Keys Linear,SupplierPartNo:1171 - A,GRNLineType:Inventory,QuantityDecimalPlaces:0,PhysicalItem:True,ItemNo:2,LineDetails:[{Quantity:10,BinLocationDescription:"",ExpiryDate:2017-10-04T10:31:15.9930000+11:00}],CustomFieldValues:[]}],PurchaseOrders:[{PurchaseOrderReceivedID:60eb36cf664444d9b362,OrderID:9bad3833b35b416d81f0}],CustomFieldValues:[]}]
System.NullReferenceException: Object reference not set to an instance of an object.
at JiwaFinancials.Jiwa.JiwaApplication.JiwaCollection`1.FindCore(PropertyDescriptor prop, Object key)
at JiwaFinancials.Jiwa.JiwaApplication.JiwaCollection`1.GetItem(String PropertyName, Object PropertyValue)
at JiwaFinancials.Jiwa.JiwaInvReceival.LineCollection.DTO_Deserialise(List`1 Lines)
at JiwaFinancials.Jiwa.JiwaInvReceival.Receival.DTO_Deserialise(GoodsReceivedNote InventoryReceival)
at JiwaFinancials.Jiwa.JiwaServiceModel.GoodsReceivedNoteServices.Post(GoodsReceivedNotePOSTRequest request) in c:\ProgramData\Jiwa Financials\Jiwa 7\7.1.0\SYSTEM\_localdb_.MSSQLLocalDB_Shared\JiwaDemo\Plugins\Admin\Compile\REST API\REST API.cs:line 5499
at lambda_method(Closure , Object , Object )
at ServiceStack.Host.ServiceRunner`1.Execute(IRequest req, Object instance, TRequest requestDto)
To be more exact the exception is shown when I specify, OrderLineID:063c73bccc1843a48f3b (which has the correct value and point to the PO Line).
Only way I can get it to work is not to specify PO information in the GRN Lines, use only Inventory ID and PartNo.
If you need more details please let me know.
Regards,
Goran
Jiwa 7.1.0.0 REST Interface - Self Hosting - Demo database C#