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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Unable to Access custom entity using liquid

(0) ShareShare
ReportReport
Posted on by

Aside from liquid being a horrible language to use, the ability not to log out the root level object to work with is infuriating. 

The issue that I'm encountering is that I can't get at my custom entities GUID to present the record name field on the portal form. 

I have a custom Application Entity that is being presented on the form. 

Attempting to access the name attribute which is on every entity doesn't work. For example I have a record with the GUID of d629e7fc-ba77-ea11-99e6-0003ff6ac9b9. 

When I put this code on the web form 

Application Details

<p>Application ID (GUID): {{request.params.id}}</p>
{% assign application = entities['ntt_applications'][request.params.id] %}
<p>{{product.name}}</p>
<p>{{application.productnumber}}</p>
<p>{{application.description}}</p>

 

This is what is rendered on the form

pastedimage1586146648174v1.png

Clearly not my record GUID. I'm just wondering what I'm doing wrong. 

Following this guide from MS here https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#entity-reference If I tried this code out 

{% assign application = entities.application['d629e7fc-ba77-ea11-99e6-0003ff6ac9b9'] %}

{% if application %} {{application.name }} (

{% endif %}

I should get access to my name field which would equal APP-2020-00176

Instead using that last liquid code block, I get nothing rendered

pastedimage1586146886522v3.png

I have the same question (0)
  • Inogic Profile Picture
    703 on at

    Hi Ethan Hurst,

     

    We have tried the below code and able to display the “Name” of the record of our “Custom Entity” on the Portal.
                   

    Code Snippet:

                    <div id"divWorker">

     

                                     <p>Worker ID (GUID): {{request.params.id}}</p>

     

                                    {% assign WorkerData = entities.new_worker[{{request.params.id}}] %}

     

     

                                    {% if WorkerData %}

         

                                                     <p><h2> Hello, {{ WorkerData.new_name }} </h2></p>

     

                                     {% else %}

     

                                                     <p> Worker does not exists</p>

     

                                     {% endif %}

     

    </div>


    Output:

    7888.custom-entity.jpg

    For the above example, we have created a new custom entity “new_worker” and created an Entity List for the same. Then we have added this webpage (i.e. which contains the above liquid code) on the “Web Page for Details View” field of that Entity List record. So when the user clicks on the “Worker” record from that Entity List, then it will navigate to the above-displayed page and will display the “GUID” and “Name” of that Worker record.

     

    Kindly check and try the “Code Snippet” (provided above) and let us know if you have any queries regarding the same.

     

    Note: While using the above functionality, please make sure that the Entity Permission is created in the CRM for the “Custom Entity”. And that Entity Permission is assigned to the Web Role of your current sign-in User. Otherwise, it will not display any data on the page. Also, if the above solution doesn’t work for you, then provide more details about the functionality that you are trying to achieve but facing issues, so that we can look into it further.

     

    Hope this helps.

     

    Thanks!

  • Community Member Profile Picture
    on at

    Hi, I've amended your snippet to match my use case.

    <p>Application ID (GUID): {{request.params.id}}</p>

    {% assign application = entities.ntt_applications[{{request.params.id}}] %}

    {% if application %}

    <p><h2> Your Application Name is: {{ application.ntt_name }} </h2></p>

    {% else %}

    <p> Application does not exists</p>

    {% endif %}

    The issue is still persisting that my GUID that I am given is not matching my application entity record GUID that is created. 

    pastedimage1586216046095v1.png

    Looking at that record that was created in CRM 

    pastedimage1586216171273v2.png

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 74 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 31 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans