How to add AccountID or ItemID when creating Check

2019-08-28 13:02发布

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
                    }  

2条回答
forever°为你锁心
2楼-- · 2019-08-28 13:24

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" };
查看更多
聊天终结者
3楼-- · 2019-08-28 13:37

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. Checkline

Items array

查看更多
登录 后发表回答