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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Dynamic content - option set

(0) ShareShare
ReportReport
Posted on by 5

We are having an issue with dynamic content based on an option set value. Multiple education preferences are available. Based on selections we want to show content. 

When setting up the email, an error is shown. Can someone explain why the error is shown and what might be a solution.

Option set values en titles

Screenshot-2022_2D00_10_2D00_17-at-13.56.53.png

Code 

Screenshot-2022_2D00_10_2D00_17-at-13.57.41.png

Error

Translation: 

Dynamic content contains a conditional statement that compares values of different types:

Screenshot-2022_2D00_10_2D00_17-at-13.57.48.png

I have the same question (0)
  • Suggested answer
    Haig Liu Profile Picture
    Microsoft Employee on at

    Hi,

    Based on your description of the error, The types of sides to be compared are not the same.

    So you need check the field’s type and value you are using in the code:

    Go to Settings > Customizations > Customize the  system > Entities > Contact > Fields.

    And you need ensure that add correct field in the dynamic content:

    Not writing name directly, you can use Personalization{} to get it, then add other contents.

    pastedimage1666080247331v1.jpeg

    I can use the following code to save and test email successfully.

    {{#if (eq contact.preferredcontactmethodcode 948150000)}}

    true

    {{else if (eq contact.preferredcontactmethodcode 948150001)}}     

    false 

    {{/if}}

    Have you tried to use other fields that type is option set? Same error?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 202 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans