Skip to main content

Notifications

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

  • Suggested answer
    Haig Liu Profile Picture
    Haig Liu Microsoft Employee on at
    RE: Dynamic content - option set

    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

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…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,868 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans