Salesforce - 当存在更多行时,查询仅返回 500 行 [英] Salesforce - query returns only 500 rows when more exist

查看:44
本文介绍了Salesforce - 当存在更多行时,查询仅返回 500 行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我不是开发这个的人,但我是拥有 SO 帐户的人.我的科幻知识几乎不存在.

First of all, I'm not the one developing this but I'm the one with the SO account. My SF knowledge is almost non-existent.

基本上,问题是查询仅从我们的 PHP 脚本返回 500 行.然而,当我们用另一个查询(直接在 PHP 中)替换该查询时,该查询返回超过 1500 行.肯定有超过 500 行应该由第一个查询返回 - 我已经使用数据浏览器进行了检查.

Basically, the problem is that a query is returning only 500 rows from our PHP script. However when we substitute that query (directly within the PHP) with another, that query returns over 1500 rows. There are definitely over 500 rows that ought to be returned by the first query - I've checked using the data explorer.

这是第一个查询:

SELECT Id,WEBSITE_ExternalId__c,Name,
.............
from Account

这是第二个:

SELECT Id,WEBSITE_ExternalId__c,D_STANDARD_Age__c,
..............
from Feedback__c 
ORDER BY CreatedDate ASC

有什么线索吗?我很欣赏这可能不是足够的信息,但我对 Salesforce 了解不多.如果您还有什么需要回答的,请询问,我会看看我能做些什么.

Any clues? I appreciate this might not be enough information but I don't know much about Salesforce. If there's anything else you'd need to answer this, ask and I'll see what I can do.

推荐答案

对于大的结果,结果是通过查询调用进行批处理的,你会得到很多行,以及一个可以用来获取下一批的令牌等等.查询结果中有一个完成标志,表示这是否是结果中的最后一批.如果 done 为 false,则需要调用传入 queryLocator(也在 queryResult 结构中返回)的 queryMore.请参阅查询/queryMore.

For large results, the results are batched by the query call, you'll get so many rows, along with a token you can use to fetch the next batch and so on. there's an done flag in the query result, that indicates if this is the last batch in the results or not. if done is false you need to call queryMore passing in the queryLocator (also returned in the queryResult structure). See the docs/examples on query/queryMore.

这篇关于Salesforce - 当存在更多行时,查询仅返回 500 行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆