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,...
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

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at

    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

  • Lanzo Profile Picture
    10 on at

    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.

  • Lanzo Profile Picture
    10 on at

    Microsoft Dynamics 365

    Wave 2 of release 2019

    Serverversie: 91000016238 Clientversie: 1454520035

  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    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

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

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans