提取 XML 以根据活动状态文本对活动进行排序



我需要一个可以根据活动状态选项集文本对所有活动进行排序的 fetchXML。

我的获取XML

<fetch top='5000' >
  <entity name='task' >
    <attribute name='activityid' />
    <attribute name='statecode' />
    <attribute name='statuscodename' />
    <order attribute='statecode' />
  </entity>
</fetch>

它正在对值进行排序。

您可以更改顺序以使用选项集值的名称:

<fetch top='5000' >
  <entity name='task'>
    <attribute name='activityid' />
    <attribute name='statecode' />
    <attribute name='statecodename' />
    <attribute name='statuscodename' />
    <order attribute='statecodename' />
  </entity>
</fetch>

最新更新