How to add AccountID or ItemID when creating Checks in QuickBooks

≡放荡痞女 提交于 2019-12-12 02:29:13

问题


When I write checks through the Intuit .Net SDK, I'm getting the following error saying

"Error validating Detail Line 1, Account ID or Item ID Field:Please specify an Item ID or an Account ID."

API Documentation also saying that Line (CheckLine) should have Account ID or Item ID. But there aren't any Property for Account ID or Item Id in CheckLine Object. Could you please tell me how to assign account Id or Item ID for the CheckLine object.

sample code:

    Dim line = New Qbo.CheckLine(1) {}
                    line(0) = New Qbo.CheckLine() With { _
                        .Amount = 20,
                        .BillableStatus = Qbo.BillableStatusEnum.NotBillable,
                        .AmountSpecified = True
                    }  

回答1:


Please see the class library documentation for .net sdk from: https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits Or use direct link: http://developer-static.intuit.com/SDKDocs/QBV2Doc/IntuitDataServicesSDK/

You need to use the items array->Itemchoicetype1 enum. The ItemsElementName returns ItemsChoiceType1[] Attaching the screenshots.




回答2:


Adding pseudo code for c# for BillpaymentHeader.

Similarly you can use it for CheckLine:

   billheader.ItemsElementName = new ItemsChoiceType[1];
   billheader.ItemsElementName[0] = ItemsChoiceType.BankAccountId;
   billheader.Items = new object[1];
   billheader.Items[0] = new Intuit.Ipp.Data.Qbo.IdType() { idDomain = Intuit.Ipp.Data.Qbo.idDomainEnum.QBO, Value = "1" };


来源:https://stackoverflow.com/questions/17358642/how-to-add-accountid-or-itemid-when-creating-checks-in-quickbooks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!