quickbooks - How to filter for a object wiith a "value" and "name" in QBO api?
问题描述
It seems like its the api won't permit a query filter of the form:
select * from purchaseorder where APAccountRef.value='33'
In the case of purchase orders it seems to mean that I need to bring down every purchase order to my server and scan for the account I need which is highly suboptimal. Is there some other syntax for querying against the many attributes which have been encoded like
"APAccountRef": {
"value": "33",
"name": "Accounts Payable (A/P)"
}
with just a name and value attribute?
解决方案
如果您参考文档:
它为您提供了所有字段的列表,以及filterable
. 您的查询使用的字段不存在于Purchase Orders
:
AccountRef.value='39'
正确的字段是:
APAccountRef:
required
ReferenceType, filterable
Specifies to which AP account the bill is credited.
所以你的查询应该是:
SELECT * FROM purchaseorder WHERE APAccountRef = '39'
推荐阅读
- swift4 - 如何在字符串的最后一个位置添加空格?
- html - 为什么我的视频轮播会堆叠视频而不是在幻灯片中显示它们?
- docker - Docker ps 没有显示我在 ps-a 中显示的容器
- swift - 使用自动布局为 UIView 高度设置动画
- android - 在openGL android中绘制带有虚线边界的矩形
- swift - 语音识别语音分析返回 Null (Swift iOS 13)
- amazon-web-services - 如果我在不到一小时的时间内删除 AWS 资源,是否需要付费?
- c++ - cmake CMAKE_PREFIX_PATH 不适用于 set()
- android - 如何在保持应用响应的同时显示大量数据
- python - 熊猫用其他数据框替换数据框中的行