Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Security
Answered

fetchxml permissions

(0) ShareShare
ReportReport
Posted on by 156
All,
 
Having difficulty getting liquid to render on a page.  After much work/research/attempts. it must be a permissions issue.
 
I've set the table permissions for both anonymous = Read and Auth/Admin = Full
 
 
 
Here is a test example.  This code is in a web template called "accountFetch-web-template";
 
***************************
{% fetchxml accounts %}
<fetch top="5">
  <entity name="account">
    <attribute name="name" />
    <attribute name="accountid" />
  </entity>
</fetch>
{% endfetchxml %}
 
<p>Number of records returned: {{ accounts.results.size }}</p>
***************************
 
It is called from a web page with {% include 'accountFetch-web-template' %}
 
But nothing is displayed.
 
Any ideas on how to get liquid to show would be greatly appreciated.
 
Doug
 

 
 
 
Categories:
  • Verified answer
    dgray304 Profile Picture
    156 on at
    fetchxml permissions
    Oliver,
     
    The latter.  The label rendered, but no value from liquid.
     
    This line was the problem:  <p>Number of records returned: {{ accounts.results.size }}</p>  The liquid was bad and it broke the rest.
     
    I pasted your TABLE iterate code in and found it worked.  ONLY after removing the trouble line (above).

    I was using "accounts.results.size".  I needed to use "accounts.results.entities".
     
    Taking the offending code out, allowed the loop to render.
     
    NOTE: Only way to get the count was to initialize a var to zero, then increment during the loop.

    Thanks, your response helped me get to a resolution.
     
    Doug 
  • Verified answer
    oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on at
    fetchxml permissions
    Hi
     
    when you say nothing is rendered, is the page fully blank or do you see something like:
    "Number of records returned: " (with no count showing)
     
    did you try to render the results of or fetch?, for example
    <table>
    {% for entityVariable in accounts.results.entities %}
    <tr>
    <td>Attribut-1: {{ entityVariable.name }}</td>
    <td>Attribut-2: {{ entityVariable.accountid }}</td>
    </tr>
    {% endfor %}
    </table>
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35

Featured topics