0

如何使用该供应商的 ListID 查询 QuickBooks 以获取特定供应商的详细信息。?我只有那个供应商的 ListID。如何使用 ListID 进行查询?我检查了SDK,发现有IVendorQuery方法,可以用来查询特定的供应商。但是我找不到将 ListID 传递给该方法以获取详细信息的方法。

我目前正在做的是从 QuickBooks 中检索所有供应商,然后尝试使用 for 循环将他们的 ListID 与我需要的 ListID 匹配。是这样的,

IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet);
IResponse response = responseMsgSet.ResponseList.GetAt(0);
IVendorRetList vendorRetList = (IVendorRetList)response.Detail;
if (vendorRetList != null)
{
 for (int j = 0; j < vendorRetList.Count; j++)
 {
  IVendorRet vendorRet = vendorRetList.GetAt(j);
  if (dvVendors.GetRowCellValue(i, "ListID").ToString() == vendorRet.ListID.GetValue())
  {
   strSeqId = vendorRet.EditSequence.GetValue();
   //code to edit that vendor using edit sequence id
  }
 }
}
4

1 回答 1

0

请参阅“查询 QB 并理解结果”部分中的此页面。

http://www.mad-computer-scientist.com/blog/2008/03/25/quickbooks-integration/

具体来说,如果过滤器不存在于可用的过滤器列表中:

IVendorQuery.ORVendorListQuery.VendorListFilter

那么它就不存在了,你会被困在查询中,就像你在原始问题中所做的那样。

于 2013-08-12T16:12:01.530 回答