Hello ,
I am facing issue with fetch xml query . there is one custom entity that I want to retrieve using fetch XML . I have given specific Entity permissions for that entity to logged in user.
When I am adding fetch XML on web page, its retrieving all the records and not considering applied filters. I have copied fetch XML from advanced find and it is showing expected records there.
below is the query that I have used
{% fetchxml query %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="contact">
<attribute name="fullname" />
<attribute name="telephone1" />
<attribute name="contactid" />
<order attribute="fullname" descending="false" />
<filter type="and">
<condition attribute="fullname" operator="eq" value="test" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
Size :: {{query.results.entities.size}}
<br>
{% for record in query.results.entities %}
FullName :: {{record.fullname}}
<br />
{% endfor %}
strangely when I placed <filters> tag before <attributes> tag it started working but issue still occurs as it doesn't work with multiple filter conditions and only first attribute will be available in results. generally XML should not rely on sequence of tags and I never faced this kind of issue in previous versions. Anyone has faced this issue? Please help.
thanks!