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!
Hi @PoojaD
I just tested your code here and seems fine, nothing wrong with it:
I don't have a phone number associated to my contact.. but when removing the filter, it showed up all contacts' numbers, so it is working as expected
would you have maybe multiple entity permissions o the Contact entity that might be mixing things up by any chance?
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Power Apps Portals Super User
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
13 | |
12 | |
11 | |
8 | |
1 |
User | Count |
---|---|
24 | |
16 | |
14 | |
11 | |
3 |