Required parameter Line.SalesItemLineDetail is missing

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Cloud Applications
Post Reply
tklawsuc
Posts: 4
Joined: Sun 30 Sep 2018 20:47

Required parameter Line.SalesItemLineDetail is missing

Post by tklawsuc » Sun 30 Sep 2018 21:01

Trying to create an invoice using dotConnect for QuickBooks. I am passing in a Line parameter as a json string as per below and I get the error Required parameter Line.SalesItemLineDetail is missing. I'm pretty sure the Line item is being read because when I remove the DetailType field I get an error that DetailType is required. Am I missing something in the SalesItemLineDetail object causing this error?

Code: Select all

[{"DetailType": "SalesItemLineDetail",
    "Amount": 0,"Description": "Custom Devices",
    "SalesItemLineDetail": {"ItemRef": { "value": "5", "name": "60"},"Qty": 1}
}]

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Required parameter Line.SalesItemLineDetail is missing

Post by Pinturiccio » Mon 01 Oct 2018 13:01

Here is an example of the select Line value from our test QuickBooks:

Code: Select all

[
  {
    "Id": "1",
    "LineNum": 1.0,
    "Amount": 10.0,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail_ItemRefId": "33",
    "SalesItemLineDetail_ItemRefName": "Charitable Contributions",
    "SalesItemLineDetail_UnitPrice": 10.0,
    "SalesItemLineDetail_Qty": 1.0,
    "SalesItemLineDetail_TaxCodeRefId": "TAX"
  },
  {
    "Amount": 10.0,
    "DetailType": "SubTotalLineDetail"
  }
]
Thus your Line value should be like the following:

Code: Select all

[
  {
    "Amount": 0,
    "Description": "Custom Devices",
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail_ItemRefId": "5",
    "SalesItemLineDetail_ItemRefName": "60",
    "SalesItemLineDetail_Qty": 1.0
  }
]
You can delete all new line characters and insert it as one line. This view is provided for visual convenience.

tklawsuc
Posts: 4
Joined: Sun 30 Sep 2018 20:47

Re: Required parameter Line.SalesItemLineDetail is missing

Post by tklawsuc » Mon 01 Oct 2018 13:33

Thank you @Pinturiccio. That did the trick!

Post Reply