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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / How to Display Account...
Power Pages
Unanswered

How to Display Account Image in a Portal Page

(0) ShareShare
ReportReport
Posted on by 179

Hi All

 

We have a requirement whereby we want to display a company logo based on the user logged into our portal. At the moment we can retrieve a company named based on the logged-in user (using the Account entity) and we can display the name using Liquid. I have noticed that the Account entity has a column called Default Image (entityimage). Can I use this value to display a company logo? So far any images displayed in our portal have been attached to Notes in a Web File. How do I display an entityimage in a portal page?

 

Thanks

Categories:
I have the same question (0)
  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    Hi @paulsnolan ,

    See this article (https://debajmecrm.com/query-and-display-entity-image-in-your-entity-list-or-entity-form-in-powerapps-dynamics-365-portals-part-1-2/) which show different ways to get entityimage field and show it on the portal.

  • paulsnolan Profile Picture
    179 on at

    Hi OOlashyn

     

    Thanks for the link.

     

    Tried the fetchXML with the following:

     

    {% assign accountid = user.parentcustomerid.id %}

     

    {% fetchxml my_query %}

        <fetch version="1.0" mapping="logical">

            <entity name="account">

                <attribute name="name" />

                <attribute name="accountnumber"/>

                <attribute name="entityimage_url"/>

                <attribute name="entityimageid"/>

                <filter type="and">

                    <condition attribute="accountid" operator="eq" value="{{ accountid }}"/>

                </filter>

            </entity>

        </fetch>

    {% endfetchxml %}

     

     

        {% for result in my_query.results.entities %}

            Returned by fetchXML:- </br>

            </br>Name: {{ result.name }}

            </br>Account Number: {{ result.accountnumber }}

            </br>Entity Image URL: {{ result.entiytimage_url }}

            </br>Entity Image ID: {{ result.entityimageid }}

        {% endfor %}

     

    It worked in so far as it returned the expected data except that the url is coming back blank

     

    Tried the query in the XrmToolBox FetchXML Builder tool and it returned a value for the url

     

    What am I missing?

  • paulsnolan Profile Picture
    179 on at

    Found another way to do this using liquid

     

    {% assign account = entities.account[user.parentcustomerid.id] %}

    {% assign entityimageurl = account.entityimage_url %}

     

    {% assign rootfolder = "HARD CODED VALUE for dynamics root folder" %}

     

    <img src="{{ rootfolder }}{{ entityimageurl }}" />

     

     

    The catch is the hard coded value. Is there a way to get this root folder value for the CDS which holds the images (the current Dynamics environment)

  • paulsnolan Profile Picture
    179 on at

    Hi OOlashyn

     

    Following my reply re fetchXML solution.

     

    My error, typo in result.entiytimage_url . Used correct value result.entityimage_url , but this only returns a relative value, it's missing the root value of the connected Dynamics 365 instance, so the image isn't displayed. 

     

    Is it possible to get the powerapps portal connected Dynamics 365 instance URL using Liquid?

     

    Thanks

     

  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    Hi @paulsnolan ,

    Unfortunately, as to my knowledge, there is ootb way to find out the url of CDS instance. You can either hardcode those values or create a separate entity which will store those values per environment etc.

  • paulsnolan Profile Picture
    179 on at

    Hi @OOlashyn

     

    Thanks for the very quick reply. Would a Site Setting also be a viable option?

  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    Yes that will work. Or using Content Snippet.

  • paulsnolan Profile Picture
    179 on at

    Thanks @OOlashyn gone with the site setting

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard