Page 1 of 1

Required parameter Line.SalesItemLineDetail is missing

Posted: Sun 30 Sep 2018 21:01
by tklawsuc
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}
}]

Re: Required parameter Line.SalesItemLineDetail is missing

Posted: Mon 01 Oct 2018 13:01
by Pinturiccio
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.

Re: Required parameter Line.SalesItemLineDetail is missing

Posted: Mon 01 Oct 2018 13:33
by tklawsuc
Thank you @Pinturiccio. That did the trick!