web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - Security
Answered

fetchxml permissions

(0) ShareShare
ReportReport
Posted on by 176
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:
I have the same question (0)
  • Verified answer
    dgray304 Profile Picture
    176 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,347 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Pages

#1
Jon Unzueta Profile Picture

Jon Unzueta 103 Super User 2025 Season 2

#2
KevinGador Profile Picture

KevinGador 32 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 32

Last 30 days Overall leaderboard

Featured topics