Power Automate List Rows使用Fetchxml查询的一个bug

看一段FetchXML, 这段查询在XRMtoolbox中的fech test工具里执行完全ok

XML 复制代码
<fetch version="1.0" mapping="logical" distinct="true" no-lock="false">
<entity name="new_projectchange">
<link-entity name="systemuser" alias="aa" link-type="inner" from="systemuserid" to="ownerid">
<link-entity name="new_projectmajorcode" alias="ab" link-type="inner" from="new_projectmajorcodeid" to="new_projectmajorcodeid">
<attribute name="new_purchaseapproval"/>
<link-entity name="systemuser" alias="sys" link-type="inner" from="systemuserid" to="new_purchaseapproval">
<attribute name="internalemailaddress"/>
</link-entity>
</link-entity>
</link-entity>
<filter type="and">
<condition attribute="new_projectchangeid" operator="eq" value="d16d9ba9-fa89-f011-b4cc-002248582342"/>
</filter>
</entity>
</fetch>

但是在list rows的步骤中却执行失败了,提示Key property 'new_projectchangeid' of type 'Microsoft.Dynamics.CRM.new_projectchange' is null. Key properties cannot have null values.

最开始以为是我的condition中的value取值错误,一直是空,但最后哪怕我写死值,还是报一样的错

最后我调整了下语句, 在顶部enitty下面加了一个attribute属性,完美解决。

XML 复制代码
<fetch version="1.0" mapping="logical" distinct="true" no-lock="false">
<entity name="new_projectchange">
<attribute name="new_projectchangeid"/>
<link-entity name="systemuser" alias="aa" link-type="inner" from="systemuserid" to="ownerid">
<link-entity name="new_projectmajorcode" alias="ab" link-type="inner" from="new_projectmajorcodeid" to="new_projectmajorcodeid">
<attribute name="new_purchaseapproval"/>
<link-entity name="systemuser" alias="sys" link-type="inner" from="systemuserid" to="new_purchaseapproval">
<attribute name="internalemailaddress"/>
</link-entity>
</link-entity>
</link-entity>
<filter type="and">
<condition attribute="new_projectchangeid" operator="eq" value="d16d9ba9-fa89-f011-b4cc-002248582342"/>
</filter>
</entity>
</fetch>
相关推荐
Kookoos3 个月前
Dynamics 365 Finance + Power Automate 自动化凭证审核
运维·自动化·dynamics 365·power automate
Vic.Tang5 个月前
Dynamics365 ExportPdfTemplate&ExportWordTemplate两个Action调用的body构造
power automate·pdf导出·word模版·dynamics365·wordtemplate
Vic.Tang1 年前
Power Automate 设置流Owner不生效的bug
flow··power automate·owner
Lucky Monkey .2 年前
微软 Power Apps Canvas App 画布应用将上传的附件转化为base64编码操作
数据库·microsoft·crm·dynamic·power apps·power automate·powerplatform
Lucky Monkey .2 年前
微软 Power Platform 零基础 Power Pages 网页搭建高阶实际案例实践(四)
微软·power platform·power pages·power apps·power automate