Python API 和 Salesforce Rest API 返回记录数的数据差异

问题描述 投票:0回答:1

我已经从版本 2 开发了版本 3 python API,代码和一切都保持不变,除了很少的查询数据,但是当我尝试直接在 sfdc 上查询数据时,两个版本的 WHERE 子句保持相同,它给了我相同的数字或记录这意味着查询没有问题,但我得到的 v3 响应是 125 条记录,而 v3 得到的响应是 250 条记录,这与 sfdc 或 python API 相关吗?

response = client.post("/composite", data=body, **kwargs)
records = []
for r in response.get("compositeResponse", ()):
    if r["httpStatusCode"] >= 300:
        continue
    if flatten:
        for rec in r["body"]["records"]:
            records.append(rec)
    else:
        records.append(r["body"]["records"])
return records

这里的客户端是位于 0x7ffb887a99d0 的 sfdclib.rest.SfdcRestApi 对象

python rest salesforce crm sfdc
1个回答
0
投票

复合材料很特别。当您手动运行每个“内部”查询时,您会得到相同数量的结果吗?也许其中一些只设置了

nextrecordsurl
,但您忽略它并仅检索结果的第一“页”。

© www.soinside.com 2019 - 2024. All rights reserved.