如何从 crm.lead.list 方法中获取下一组项目?
how can I get the next set of items from the crm.lead.list method?
我正在尝试创建超过 50 项的潜在客户列表,所以我遇到了列表方法的限制。在培训网站上,我已经发现我需要调用以获得下一组,但我没有在 php 中找到应该如何完成的所有示例都在 javascript 中,所以这是没有帮助。
当前方法调用我试图让它工作,但我只得到相同的结果集:
$fistSet = CRest::call("crm.lead.list", [
"order"=> [ "ID"=> "ASC" ],
"filter"=> [ "UF_CRM_1600929716160"=> 632],
"select"=> [ "ID", "TITLE", "STATUS_ID", "OPPORTUNITY", "CURRENCY_ID" ]
]);
echo "<pre>";
var_dump($fistSet);
echo "</pre>";
echo "<br>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>";
$total = $firstSet["total"];
$next = $firstSet["next"];
$secondSet = CRest::call("crm.lead.list", [
"order"=> [ "ID"=> "ASC" ],
"filter"=> [ "UF_CRM_1600929716160"=> 632], "OFFSET"=>$next,
"select"=> [ "ID", "TITLE", "STATUS_ID", "OPPORTUNITY", "CURRENCY_ID" ]
]);
echo "<pre>";
var_dump($secondSet);
echo "</pre>";
假设这是针对 Bitrix 的,他们的文档说来自 next
的响应应该在您的下一个请求中通过 start
属性 传递。所以将 offset
换成 start
.
我正在尝试创建超过 50 项的潜在客户列表,所以我遇到了列表方法的限制。在培训网站上,我已经发现我需要调用以获得下一组,但我没有在 php 中找到应该如何完成的所有示例都在 javascript 中,所以这是没有帮助。
当前方法调用我试图让它工作,但我只得到相同的结果集:
$fistSet = CRest::call("crm.lead.list", [
"order"=> [ "ID"=> "ASC" ],
"filter"=> [ "UF_CRM_1600929716160"=> 632],
"select"=> [ "ID", "TITLE", "STATUS_ID", "OPPORTUNITY", "CURRENCY_ID" ]
]);
echo "<pre>";
var_dump($fistSet);
echo "</pre>";
echo "<br>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>";
$total = $firstSet["total"];
$next = $firstSet["next"];
$secondSet = CRest::call("crm.lead.list", [
"order"=> [ "ID"=> "ASC" ],
"filter"=> [ "UF_CRM_1600929716160"=> 632], "OFFSET"=>$next,
"select"=> [ "ID", "TITLE", "STATUS_ID", "OPPORTUNITY", "CURRENCY_ID" ]
]);
echo "<pre>";
var_dump($secondSet);
echo "</pre>";
假设这是针对 Bitrix 的,他们的文档说来自 next
的响应应该在您的下一个请求中通过 start
属性 传递。所以将 offset
换成 start
.