![]()
The “Object not found” error in Power Pages (formerly Power Apps Portals) occurs when you’re using Liquid templates to fetch or display data, and the object you’re referencing either does not exist, is inaccessible, or fails due to security filtering like Entity Permissions.
This guide will explain the causes, walk you through common scenarios, and offer step-by-step troubleshooting to resolve the error.
Understanding the “Object not found” Error
Liquid is a server-side templating language used to retrieve and display data in Power Pages.
The error appears like this:
Liquid error: Object 'case' not found.
Or simply:
Object not found.
Common Causes
- Missing Record (Primary Key ID doesn’t exist)
- Incorrect Liquid Syntax
- Entity Permission not granted for the current user
- Wrong FetchXML or
entitytag logic - Incorrect table (entity) name or plural name
- Invalid or expired
request.querystringor route values - Liquid loops referencing an object outside scope
Example Situations
1. Referencing a Record That Doesn’t Exist
{% assign case = entities['incident']['0b12ac1e-23ab-44d2-91e3-xxxxxxx'] %}
{{ case.title }}
If the record with that GUID doesn’t exist, or the user can’t access it, you’ll get the object not found error.
2. Using Wrong Syntax or Misnamed Entity
liquidCopyEdit{% assign contact = entities.contact['id'] %}
If contact isn’t the right entity name or 'id' isn’t a valid key, the object fails.
Step-by-Step Troubleshooting
Step 1: Check if the Record Actually Exists
If you’re referencing a record via ID:
- Go to Dataverse (or Portal Management App)
- Search for the record
- Verify it exists and is active
Step 2: Check Entity Name and Case Sensitivity
Liquid uses logical names of tables/entities:
Correct:
entities['incident']
Incorrect:
entities['Incident']
Entity names in Liquid are case-sensitive and must be schema names, not display names.
Step 3: Verify Entity Permissions
Even if the record exists, the portal may restrict access via Entity Permissions.
To check:
- Go to Portal Management App
- Navigate to Entity Permissions
- Ensure:
- Permission is created on the correct table
- It includes Read privilege
- The permission is assigned to the right Web Role
- The Portal User (Contact) has that role
Also confirm if the scope (e.g., Contact/Account) aligns with the user’s relationship to the data.
Step 4: Check Your Liquid Syntax
Bad Liquid syntax can cause object referencing failures.
Example of a working fetchxml block:
{% fetchxml open_cases %}
<fetch top="5">
<entity name="incident">
<attribute name="title" />
<filter>
<condition attribute="statecode" operator="eq" value="0" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
<ul>
{% for case in open_cases.results.entities %}
<li>{{ case.title }}</li>
{% endfor %}
</ul>
Incorrect:
{% for case in cases %}(ifcasesis undefined)- Using
resultswrong, likeopen_cases.entitiesinstead ofopen_cases.results.entities
Step 5: Validate Route Values and Query Strings
If you use values like:
{% assign id = request.params['id'] %}
Make sure the URL includes ?id=<guid> or the id is passed via route mapping.
No value or an invalid one will break the record reference.
Step 6: Use Debug Output (Temporary)
For debugging, output key elements:
{{ request.params['id'] }}
{{ user.fullname }}
{{ user.id }}
Use {% if case != null %}...{% endif %} to safely check object existence before accessing properties.
Step 7: Clear Cache (After Permission Change)
Always clear portal cache if you’ve just added or modified:
- Entity Permissions
- Web Role assignments
Do this by visiting:
arduinoCopyEdithttps://yourportal.powerappsportals.com/_services/about
Click Clear Cache
Example Fix
Scenario:
You created a custom page to show support case details using a Liquid template like:
{% assign case = entities['incident'][request.params['id']] %}
<h2>{{ case.title }}</h2>
But users see:
“Object not found”
Resolution Steps:
- Verify the
idquery string is passed correctly:https://yourportal.com/support-case?id=GUID
- Confirm the record exists in Dataverse
- Create Entity Permission on
incidenttable:- Scope:
Contact - Privileges: Read
- Assign to a Web Role
- Scope:
- Assign the Web Role to the portal user (Contact)
- Clear cache
- Retest
