In this blog post, we’ll explore how to fetch data from a Dataverse table (for example, Job Application) and display the records right on the Home page of your Power Pages site using Liquid templates.
This is a common requirement in real-world Power Platform projects where you need to display dynamic data like upcoming events, announcements, or courses on public-facing pages.
🧠 What You Will Learn
- How to configure table permissions
in Power Pages
- How to write Liquid code to
fetch records from Dataverse
- How to render those records neatly on
your Home page
- Tips for working with dynamic content
in a secure and readable way
📌 Prerequisites
Before we begin,
make sure you have the following in place:
✅
A Dataverse table (in our case, Job Application)
✅ Power
Pages site connected to your Dataverse environment
✅ Access to
Portal Management App
✅ Basic
knowledge of HTML and Liquid syntax
🛠 Step 1: Configure Table Permissions
Power Pages uses entity
permissions to control access to Dataverse data.
👉 Go to Portal Management > Table Permissions
- Create a new permission for your
table (Job Application)
- Give it Global Read access (or
restrict with Web Roles as needed)
- Add the appropriate Web Role (like
Authenticated Users or Anonymous Users)
Or we can try
like this ,
then,
🔐 This is a mandatory step, otherwise your data won’t load on
the page.
🛠 Step 2: Write Liquid Code to Fetch
Records
You can either
place the code directly in your page or create a reusable Web
Template.
Here’s a sample
Liquid snippet to get all active events:
- <h1>Pages Test123</h1>
- <div class="container">
- <div class="row">
- <div class="col-lg-12">
- <h3>Job Applications</h3>
- {% entityview logical_name: 'crdbc_jobapplication', name: 'Active Job Applications' %}
- {% if entityview.records.size > 0 %}
- {% for app in entityview.records %}
- <div class="card my-2">
- <div class="card-body">
- <h5 class="card-title">{{ app.crdbc_email }}</h5>
- </div>
- </div>
- {% endfor %}
- {% else %}
- <p>No applications found.</p>
- {% endif %}
- {% endentityview %}
- </div>
- </div>
- </div>
📝 Replace the table name and column name with your actual
column schema names.
⚙️ Site Settings to Check
Ensure these are
present under Portal Management > Site Settings:
Name |
Value |
Site/EnableLiquid |
true |
Site/EnableEntityPermissions |
true |
✅ Final Output
Once done, go to
your Power Pages Home page and you should see your list of Job Application
records dynamically loaded from Dataverse.
📣 Wrapping Up
That’s it! Using Liquid
templates in Power Pages, we can pull real-time Dataverse data and show it
directly on the site without writing any JavaScript or backend code.
Whether it’s an event list, employee directory, or course catalog—this pattern works great across scenarios.
No comments:
Post a Comment