Hi, sorry for lack of information. We are using the endpoint: POST /controller/api/v2/salesorder Here is an example of our json throught post, and error message below: Response code 500 - internal servererror { "soBillingAddress": { "addressLine3": "0" }, "lines": [ { "alternateID": "6796", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 8.0, "note": "6796 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.14, "unitCost": 0.14, "note": "6796 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11251", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 1.0, "note": "11251 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.01, "unitCost": 0.01, "note": "11251 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11219", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 1.0, "note": "11219 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.04, "unitCost": 0.04, "note": "11219 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "155940", "subaccount": [], "externalLink": "00001481", "operation": "Insert", "inventoryNumber": "1006006", "uom": "stk", "quantity": 3858.0, "note": "155940 | Region Sj�lland eNotify | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": "00001481", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.0, "unitCost": 0.55, "note": "155940 | Region Sj�lland eNotify | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "147162", "subaccount": [], "externalLink": "00003908", "operation": "Insert", "inventoryNumber": "1002002", "uom": "stk", "quantity": 22417.0, "note": "147162 | KMD | 5798002040708 | Plads betales for: 124 MB | Plads total: 124 MB" }, { "subaccount": [], "externalLink": "00003908", "operation": "Insert", "inventoryNumber": "1003014", "uom": "stk", "quantity": 124.04, "unitCost": 124.04, "note": "147162 | KMD | 5798002040708 | Plads betales for: 124 MB | Plads total: 124 MB" }, { "alternateID": "1649", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 59.0, "note": "1649 | | 5798002040708 | Plads betales for: 009 MB | Plads total: 009 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 9.40, "unitCost": 9.40, "note": "1649 | | 5798002040708 | Plads betales for: 009 MB | Plads total: 009 MB" }, { "alternateID": "179355", "subaccount": [], "externalLink": "00003361", "operation": "Insert", "inventoryNumber": "1002002", "uom": "stk", "quantity": 11800.0, "note": "179355 | Str�lfors Connect | 5798002040708 | Plads betales for: 749 MB | Plads total: 749 MB" }, { "subaccount": [], "externalLink": "00003361", "operation": "Insert", "inventoryNumber": "1003014", "uom": "stk", "quantity": 749.34, "unitCost": 749.34, "note": "179355 | Str�lfors Connect | 5798002040708 | Plads betales for: 749 MB | Plads total: 749 MB" }, { "alternateID": "11180", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 1.0, "note": "11180 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.06, "unitCost": 0.06, "note": "11180 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "8805", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 9.0, "note": "8805 | | 5798002040708 | Plads betales for: 001 MB | Plads total: 001 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 1.44, "unitCost": 1.44, "note": "8805 | | 5798002040708 | Plads betales for: 001 MB | Plads total: 001 MB" }, { "alternateID": "171645", "subaccount": [], "externalLink": "00003908", "operation": "Insert", "inventoryNumber": "1002002", "uom": "stk", "quantity": 12752.0, "note": "171645 | KMD | 5798002040708 | Plads betales for: 536 MB | Plads total: 536 MB" }, { "subaccount": [], "externalLink": "00003908", "operation": "Insert", "inventoryNumber": "1003014", "uom": "stk", "quantity": 536.99, "unitCost": 536.99, "note": "171645 | KMD | 5798002040708 | Plads betales for: 536 MB | Plads total: 536 MB" }, { "alternateID": "11239", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 2.0, "note": "11239 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.08, "unitCost": 0.08, "note": "11239 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11178", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 3.0, "note": "11178 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.14, "unitCost": 0.14, "note": "11178 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "147164", "subaccount": [], "externalLink": "00003908", "operation": "Insert", "inventoryNumber": "1002002", "uom": "stk", "quantity": 17786.0, "note": "147164 | KMD | 5798002040708 | Plads betales for: 105 MB | Plads total: 105 MB" }, { "subaccount": [], "externalLink": "00003908", "operation": "Insert", "inventoryNumber": "1003014", "uom": "stk", "quantity": 105.04, "unitCost": 105.04, "note": "147164 | KMD | 5798002040708 | Plads betales for: 105 MB | Plads total: 105 MB" }, { "alternateID": "9753", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 4.0, "note": "9753 | | 5798002040708 | Plads betales for: 006 MB | Plads total: 008 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 6.13, "unitCost": 8.19, "note": "9753 | | 5798002040708 | Plads betales for: 006 MB | Plads total: 008 MB" }, { "alternateID": "147161", "subaccount": [], "externalLink": "00003908", "operation": "Insert", "inventoryNumber": "1002002", "uom": "stk", "quantity": 25513.0, "note": "147161 | KMD | 5798002040708 | Plads betales for: 218 MB | Plads total: 218 MB" }, { "subaccount": [], "externalLink": "00003908", "operation": "Insert", "inventoryNumber": "1003014", "uom": "stk", "quantity": 218.63, "unitCost": 218.63, "note": "147161 | KMD | 5798002040708 | Plads betales for: 218 MB | Plads total: 218 MB" }, { "alternateID": "11049", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 1.0, "note": "11049 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.05, "unitCost": 0.05, "note": "11049 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11216", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 1.0, "note": "11216 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.04, "unitCost": 0.04, "note": "11216 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11185", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 3.0, "note": "11185 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.42, "unitCost": 0.42, "note": "11185 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11226", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 17.0, "note": "11226 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.74, "unitCost": 0.74, "note": "11226 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11211", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 2.0, "note": "11211 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.08, "unitCost": 0.08, "note": "11211 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11173", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 2.0, "note": "11173 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.08, "unitCost": 0.08, "note": "11173 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11177", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 1.0, "note": "11177 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.03, "unitCost": 0.03, "note": "11177 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11205", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 1.0, "note": "11205 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.04, "unitCost": 0.04, "note": "11205 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11175", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 7.0, "note": "11175 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.23, "unitCost": 0.23, "note": "11175 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11208", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 4.0, "note": "11208 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 0.16, "unitCost": 0.16, "note": "11208 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB" }, { "alternateID": "11221", "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1002101", "uom": "stk", "quantity": 11.0, "note": "11221 | | 5798002040708 | Plads betales for: 002 MB | Plads total: 002 MB" }, { "subaccount": [], "externalLink": " ", "operation": "Insert", "inventoryNumber": "1003011", "uom": "stk", "quantity": 2.44, "unitCost": 2.44, "note": "11221 | | 5798002040708 | Plads betales for: 002 MB | Plads total: 002 MB" } ], "orderType": "EB", "hold": true, "date": "2021-08-01T00:00:00", "requestOn": "2021-08-31T00:00:00", "customer": "85", "description": "Inngående ordre fra eBoks" } "Response": Error creating salesOrder. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> PX.Data.PXForeignRecordDeletedException: Error: The record has been deleted. at PX.Data.PXSelectorAttribute.SubstituteKeyFieldUpdating(PXCache sender, PXFieldUpdatingEventArgs e) at PX.Data.PXDimensionSelectorAttribute.FieldUpdating(PXCache sender, PXFieldUpdatingEventArgs e) at PX.Objects.IN.CrossItemAttribute.FieldUpdating(PXCache sender, PXFieldUpdatingEventArgs e) in D:\Data\BuildAgent\work\11023e52ea15d342\Web\Pure\PX.Objects\IN\Descriptor\Attribute.cs:line 8157 at PX.Data.PXCache.OnFieldUpdating(String name, Object row, Object& newValue) at PX.Data.PXCache`1.SetValueExt(Object data, String fieldName, Object value) --- End of inner exception stack trace --- at Visma.net.ERP.Api.Base.BaseDomain.HandleChildCommand(IBaseCommand cmd, Boolean handleChildCommands) in D:\Data\BuildAgent\work\11023e52ea15d342\Web\Lib\Visma.net.ERP.Api\Base\BaseDomain.cs:line 72 at Visma.net.ERP.Api.Base.BaseDomain.ApplyChildCommands(IEnumerable`1 childCommands, Boolean handleChildCommands) in D:\Data\BuildAgent\work\11023e52ea15d342\Web\Lib\Visma.net.ERP.Api\Base\BaseDomain.cs:line 44 at Visma.net.ERP.Api.SO.CommandModel.SoCommandHandler.Handle_V2(ICreateSalesOrderCommand[] cmdList) in D:\Data\BuildAgent\work\11023e52ea15d342\Web\Lib\Visma.net.ERP.Api\SO\CommandModel\SoCommandHandler.cs:line 83 at Visma.net.ERP.Web.Api.Repositories.SOOrderWebRepository.CreateSaleOrderReturnSaleOrderNumber(SalesOrderUpdateDto salesOrderUpdateDto, String orderType, Int32 version) in D:\Data\BuildAgent\work\11023e52ea15d342\Web\Lib\Visma.net.ERP.Web.Api\Repositories\SOOrderWebRepository.cs:line 178 Error: The record has been deleted.
... View more