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

Image attributes and primary image

(1) ShareShare
ReportReport
Posted on by 22

I have an image attribute on a custom entity, however, I am not able to check the box:

pastedimage1595510527328v1.jpeg

I have set the Primary Image field for the entity to the image attribute.

pastedimage1595510665249v3.png

My hunch is that this is not working because when I created the entity, I set the schema name of the ImageAttributeMetadata to something other than "EntityImage."

However, according to the docs:

1. "There can be multiple image attributes in an entity instance but there can be only one primary image. However, you can change the primary image from one image to another by setting IsPrimaryImage for that attribute to true." (https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/image-attributes)

2. "You can add image attributes to custom entities. When an entity has an image attribute, you can set the PrimaryImageAttribute property to control whether the image will be shown in the application. When the image is shown in the application users of the web application can upload pictures for the entity record." (https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/introduction-entities#entity-images)

Yet, also according to the docs:

3. "For those entities which support image attributes, the SchemaName of the entity image attribute is always EntityImage." (https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/introduction-entity-attributes#image-data-attributes)

4. "When an entity contains a ImageAttributeMetadata attribute this value will be the name of the attribute containing the image used in the application. Each entity can have only one image attribute and the logical name of that attribute is always entityimage. This property has been added to prepare for a future release in which entities may support multiple image attributes and there may be need to change which image is used as the primary image for the entity" (https://docs.microsoft.com/en-us/dotnet/api/microsoft.xrm.sdk.metadata.entitymetadata.primaryimageattribute?view=dynamics-general-ce-9#Microsoft_Xrm_Sdk_Metadata_EntityMetadata_PrimaryImageAttribute)

 

I was hoping that the first two statements were correct so that I could indeed swap out various image attributes if needed, but I suspect this is not the case.  For the record, in the entitymetadata for my custom entity, the "PrimaryImageAttribute" property does contain the correct image attribute name, however, that name is not "entityimage"

It is quite frustrating when the docs seem to contradict themselves.

Can anyone clarify which is the correct statement?  If it is the first, any ideas about how to enable the checkbox in the first image so the image will appear on the form?

I have the same question (0)
  • flavia.takushi Profile Picture
    on at

    Hello Majellin, the difference in the documentation might be related to version.

    Could you please confirm your CRM build version?

    Is there a particular reason to set schema name other than EntityImage?

  • AgilePoint AgileXRM Profile Picture
    155 on at

    The short answer: The Show image in the form checkbox is deprecated and not needed in Unified Interface.

    In Unified Interface, once you have an Image field and point to it in Entity definition, you will see the image in the forms irrespective of that flag. Also, the Schema Name for the Image field can be anything, not necessarily EntityImage.

    More details here: https://community.dynamics.com/365/fieldservice/f/dynamics-365-for-field-service-forum/384705/image-field-in-entity

  • Majellin Profile Picture
    22 on at

    Unfortunately this is not true in my case.  I think it might be something to do with using on-premises, although the post you linked seems to be on-premises as well, at least from the links in their post (although their UI looks different from mine).

    pastedimage1599847226174v1.png

    pastedimage1599847436132v2.png

    pastedimage1599848952142v7.png <-- The circle is not clickable/editable

    pastedimage1599847494147v3.png

    pastedimage1599847528937v4.png

    pastedimage1599847578017v5.png

    As you can see, the image does not display on the form, even though the entity has an image field. In the old UI there is nothing there and in Unified Interface the green circle is not clickable to edit.

    Further, if I try to add an Image Field to an entity, the schema name gets locked to "entityimage" and I cannot change it.

    pastedimage1599849039110v8.png

  • CU15020854-0 Profile Picture
    2 on at

    It definitely sounds frustrating when the documentation seems to contradict itself! Based on what you’ve found, it does appear that the PrimaryImageAttribute is expected to have the schema name EntityImage, which might explain why the checkbox isn't enabled. Even though the docs mention future flexibility for multiple image attributes, it looks like the current implementation still requires that fixed schema name.

    You could try renaming the image attribute to EntityImage (if possible) and see if that resolves the issue. Otherwise, a workaround might be manually setting the IsPrimaryImage property via code if that’s an option.

    Also, if you're dealing with low-resolution or pixelated images within the entity, you might consider using a free AI tool to enhance pixelated images, which can help improve clarity and make them look sharper within your application! 🚀📸

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 144 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 59

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans