Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Conditional statements in email using fields from the Content Settings

(0) ShareShare
ReportReport
Posted on by 84

Hi all, hopefully somebody worked on a related issue before. I'm trying to set up conditional statement in an email to display dynamic content only if the field is not empty.

This is the code that I'm trying to use. However MSDN tells me that it contains a syntax error. I'm trying to populate values from a field that belongs to the Content Settings entity. Is it even possible?

If the URL field for Twitter is empty in the Content Settings I don't want to display the Twitter icon. That is the logic I'm trying to apply.

<p>
{{#if (eq msdyncrm_contentsettings.msdyncrm_twitterurl}} '')}}
Yes
{{/if}} </p>

  • Suggested answer
    Vinayd-MSFT Profile Picture
    Vinayd-MSFT Microsoft Employee on at
    RE: Conditional statements in email using fields from the Content Settings

    The syntax error is likely coming because of extra curly braces at the end of "twitterurl" - removing them should fix the issue:

    {{#if (eq msdyncrm_contentsettings.msdyncrm_twitterurl'')}}

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…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans