cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lakshmip1
Frequent Visitor

Power Apps portal fetchxml working in preview but not when browsed

Hi,

I have a fetchxml liquid query, to get data from a custom dataverse table.

 

{% fetchxml query %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="cr72d_sppopportunitypendingpayou">
<attribute name="cr72d_dealregistrationid" />
<attribute name="cr72d_opportunityname" />
<attribute name="cr72d_accountname" />
<attribute name="cr72d_sourceoflead" />
<attribute name="cr72d_partnerrole" />
<attribute name="cr72d_stage" />
<attribute name="cr72d_closedate" />
<order attribute="cr72d_dealregistrationid" descending="false" />
</entity>
</fetch>
{% endfetchxml %}
{{query.results.entities.size}}
<br>
<div style="margin-left:20px">
<table border="1" style="width:100%;padding:10px;">
{% for record in query.results.entities %}
{% if user.roles contains record.cr72d_sourceoflead %}
<tr>
<td>
{{ record.cr72d_opportunityname }}
</td>
<td>
{{ record.cr72d_dealregistrationid }}
</td>
</tr>
{% endif %}
{% endfor %}
<table>
</div>
<br />
 
Using this query, I see that the query is fetching the values from preview. But when I try to browse, I see that the size of resultant records is '0'
 
Please let me know if there is an issue in the query.
 
Thanks,
Prasuna
 
1 ACCEPTED SOLUTION

Accepted Solutions
Fubar
Solution Sage
Solution Sage

It is most likely that the Portal User does not have adequate entity permissions to the Tables in the query.  The fetchxml tag in the portal applies the current portal users Web Role/Entity Permissions as part of executing the query.

View solution in original post

1 REPLY 1
Fubar
Solution Sage
Solution Sage

It is most likely that the Portal User does not have adequate entity permissions to the Tables in the query.  The fetchxml tag in the portal applies the current portal users Web Role/Entity Permissions as part of executing the query.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (62,098)