Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Showing custom image in Dynamics365 Event Portal

(0) ShareShare
ReportReport
Posted on by 10

When I retreive the events from D365 with the Porail Api the field image is empty.

Therefore I can not show the image selected with the event.

Has anyone have the same problem?

Does anyone have a solution to fix this?

Best regards,

Lanzo van Slooten

  • Verified answer
    cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Showing custom image in Dynamics365 Event Portal

    Hi Lanzo,

    Thanks for sharing you version.

    Could you confirm that the issue also exists in your Portal?

    It's easy to use custom field as alternative to default image field.

    Part 1: Create a flow to sync event image URL to custom field of Event entiy

    1. Create a custom field for Event entity to save image file URL

    2. Create a flow, e.g:

    When an event is selected,(to make this action appears, we should select any of record in entitylist, then click Flow > Create a flow)

    check whether Event Image field contains data,

    if there is a image file selected, update the selected event custom field with image URL

    0552.pastedimage1588039510191v1.png

    The correct field is "BLOB CDN URL":

    3632.pastedimage1588039667375v2.png

    Part 2:

    Expose custom field to Event API:

    0726.pastedimage1588039902931v3.png

    Add custom logic inside event.component.ts(in src/app/components/event folder) > getBannerImage function:

    public getBannerImage() {
        if (this.event == null) {
            // This early exit avoids showing placeholder image while event isn't loaded.
            return '';
        }
    
        if (this.event.image != null) {
            return this.event.image;
        } else {
            if (environment.useRestStack === true) {
                if (this.event.customFields.hasOwnProperty("new_eventimageurl")) {
                    if (this.event.customFields["new_eventimageurl"] !== null) {
                        return this.event.customFields["new_eventimageurl"];
                    }
                } else {
                    return this.imageHelper.getImageUrl(this.defaultImageUrlSelfHosted);
                }              
            } else {
                return this.imageHelper.getImageUrl(this.defaultImageUrlCrmHosted);
            }
        }
    }

    pastedimage1588039936433v4.png

    Result:

    pastedimage1588040037096v5.png

    In short, due to there is issue in Event API image field, so we fetch event image blob URL manually.

    Regards,

    Clofly

  • Lanzo Profile Picture
    Lanzo 10 on at
    RE: Showing custom image in Dynamics365 Event Portal

    Microsoft Dynamics 365

    Wave 2 of release 2019

    Serverversie: 91000016238 Clientversie: 1454520035

  • Lanzo Profile Picture
    Lanzo 10 on at
    RE: Showing custom image in Dynamics365 Event Portal

    I will check the version of dynamics marketing. And yes we are using the self hosted version.

    When it won't work we will try a custom Field.

    Thank you in advance.

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Showing custom image in Dynamics365 Event Portal

    Hi Lanzo,

    Could you share me version of your Dynamics Marketing application? And is your event website self-hosted?

    From test on my environment:

     Mkt Version  Host
           Trial  both localhost test and from automatically generated Event URL 

    It seems that custom image feature is not supported in trial version,

    even if Event image field of Event record contains value, but the image property of event record by Event API is always null.

    You could add event image field as custom field if you want to make the background image could change dynamically in trial version.

    If your environment has subscribed, then further assistance might be needed.

    Regards,

    Clofly

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,468 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,289 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans