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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Displaying the account...
Power Pages
Answered

Displaying the account name from contact entity

(0) ShareShare
ReportReport
Posted on by 45

Hello everyone! I am having trouble with displaying the  "Account" name from a Contact record on a Portal page. I've tried this a couple ways, and for the life of me I cannot figure out why I can't display the account name like i want to.

 

The reason I want to pull the Account Name, is I would like to filter/redirect based on the account. I have several PowerBI Reports that are in different workspaces based on client. I want to be able to say " If Account = "parentcustomerid, then display this PowerBI report"

 

But - I can't get the Account Name (parentcustomerid) to even display!

 

I've placed the following in a webpage, trying to just display the information. I've selected a couple fields from the Contact Entity to at least prove I am in the right area.

 

 

rgilreath_2-1595258420157.png

 

I've made sure that I have a contact with the Account filled in:

rgilreath_1-1595258389894.png

 

But, when I render the page - this is what I get:

rgilreath_0-1595258329512.png

It pulls the other information correctly (email, phone, etc), but I cannot get it to show the Company Name.

 

I've added an entity record to then profile page as well - which shows that the Account Name is filled in on the Profile (free text, but still) as well as the user has access to the Account in question and can View the record:

rgilreath_3-1595258656645.png

 

I've created an Entity Permission, which allows the Web Role to Read/Write to the Contact and Account entities

 

I am not sure where I am going wrong in displaying this information. Any assistance is greatly appreciated!

 

Categories:
  • H V Profile Picture
    1,510 on at

    Hi @rgilreath

    Please try below code

     

    ParentAccountId: {{user.parentcustomerid.id}}
    ParentAccountName: {{user.parentcustomerid.name}}

     

     

    If this helps you, mark as a solution! 

  • Verified answer
    OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    Hi @rgilreath,

     

    Explaining a bit answer from @hardikv - parentcustomerid is a lookup value which is returned in the liquid as Entity Reference object (find more in docs here). This object contains 3 properties - Id, Name and logical_name of the entity. That's why when you tried to just use parentcustomerid you see nothing as it is a complex object and cannot be just printed on the page.

  • RyanGilreath Profile Picture
    45 on at

    Thank you @OOlashyn - that is exactly what I was missing from reading through the documents.

     

    I appreciate your help and feedback!

  • Zap174 Profile Picture
    167 on at

    Hello! Where did you place the code to print the information for the current logged in user? Was it in the JSON of the web page? Could you show me what the source code looks like?

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @Zap174 

     

    In Portal studio: 

     

    1. Select your web page and click <source code> icon at the bottom right and paste in your liquid code along with HTML tag. For Example 

    <div>
    ParentAccountId: {{user.parentcustomerid.id}}
    ParentAccountName: {{user.parentcustomerid.name}}
    </div>

     

    Hope it helps. 
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

  • Zap174 Profile Picture
    167 on at

    Hi ragavanrajan,

    Thanks for the reply. When I paste the code into the code editor, it appears as such after I save it:

    Zap174_0-1645725367620.png

    Then, when browsing my website, the text appears like this, even when I am signed into an account:

    Zap174_1-1645725566235.png

     

    Any ideas?

     

     

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @Zap174 

     

    Worth changing the color of the text or try inspecting the element and see if the data presents

     

    Also, make sure you set the table permissions properly. 

     

    Hope it helps. 
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

  • Zap174 Profile Picture
    167 on at

    Hi @ragavanrajan 

    Thanks for the help. I got it working! One more question, I want to hide the page tab on the bottom of the report and the filter pane on the right side of the report. How would I go about that?

  • Zap174 Profile Picture
    167 on at

    Hi sorry for the confusion. I was able to get rid of the page and nav pane by editing the javascript on the web page according to the documentation found here:Add a Power BI report or dashboard to a webpage in a portal - Power Apps | Microsoft Docs

     

    I would like to get rid of the border around the report, how would I go about this?

    Zap174_0-1646410331002.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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
M Bilal Khan Profile Picture

M Bilal Khan 99

#2
Mohsin Ali Profile Picture

Mohsin Ali 37

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard