I am getting "Facing Error "The entityname attribute is not a valid attribute for link-entity" error with following fetchXML query from Iframe js script.
<fetch mapping="logical" version="1.0"> <entity name="customeraddress"> <attribute name="exch_altaddresstype" /> <attribute name="line1" /> <attribute name="line2" /> <attribute name="city" /> <link-entity name="customeraddress" alias="ab" from="parentid" to="parentid" link-type="inner"> <filter> <condition entityname="ab" attribute="customeraddressid" operator="eq" value="48d50047-66b1-e611-94cd-005056b33beb" /> </filter> </link-entity> <filter> <condition attribute="exch_altaddresstype" operator="ne" value="119080000" /> <condition attribute="stateorprovince" operator="not-null" /> </filter> </entity> </fetch>
I wonder the same query is working fine on CRM2011 but not in CRM2016. Observed after removing entityname="ab" from filter condition its give me output.