gpt4 book ai didi

javascript - 为什么他的 fetchXml count 属性不限制返回的记录?

转载 作者:行者123 更新时间:2023-11-29 09:57:54 24 4
gpt4 key购买 nike

我有一个 javascript 函数,它使用 fetchXML 将自定义 View 添加到控件。我的问题是根上的计数属性 <fetch>节点不工作。我将它设置为 6,但它返回 26 条记录(所有记录),由提取定义。

这是 fetchXML

<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' count='6'>
<entity name='xyz_entity'>
<attribute name='xyz_entityname' />
<attribute name='xyz_startdate' />
<attribute name='xyz_enddate' />
<attribute name='xyz_currententity' />
<attribute name='xyz_inactiveentity' />
<order attribute='xyz_currententity' descending='true' />
<order attribute='xyz_startdate' />
<filter type='or'>
<condition attribute='xyz_currententity' operator='eq' value='1' />
<filter type='and'>
<condition attribute='xyz_startdate' operator='ge' value='2011-11-01' />
<condition attribute='xyz_enddate' operator='gt' value='2011-11-01' />
</filter>
</filter>
</entity>
</fetch>

并且像这样在 javscript 中使用 fetchXML:

Xrm.Page.getControl("itt_termid").addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true);

但是当用户点击查找图标时,将返回所有 26 条记录,而不是 6 条记录。

最佳答案

您是否尝试过明确指定页码(如 1)?

有点像

<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'     page='1' count='6'>

关于javascript - 为什么他的 fetchXml count 属性不限制返回的记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7984988/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com