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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Marketing Email Dynamic Content Option set is not working

(0) ShareShare
ReportReport
Posted on by 216

Hi Everyone,

I'm using Dynamic code in email to get those records which lies under the condition but, it's not working. My email is going Live but it's not presenting the relative records in a email .. I'M SHARING MY DYNAMIC code. The if statement is basically on option set and im using the number behind the label as it is decribes in this document https://docs.microsoft.com/en-us/dynamics365/marketing/dynamic-email-content

and my dynamic code is

{{#each contact.tv_orderproducttask_contact_regardingobjectid}}

{{#if (eq this.tv_addtoemail 772480000)}}
<li>Product Name: {{this.subject}} Valid To: {{this.scheduledend}}</li>

{{/if}}

{{/each}}

Thanks

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

    Hi Fariha,

    There is no error in your iteration and conditional statement,

    the real reason of failure is that you've added date field(scheduledend) in email content.

    In some instances, date field will fail the error check,

    it's has been stated as a known issue from doc,

    https://docs.microsoft.com/en-us/dynamics365/marketing/readme#known-issues-3

    please contact Support team to fix it for your instance.(also it existes in my trial version)

    pastedimage1579142422457v1.png

    Regards,

    Clofly

  • Fariha Asmat Profile Picture
    216 on at

    Hi Clofy,

    My emails are "Going Live" but when I run the customer journey and Emails I rceieved through customer journey doesnot contains the records, which falls under my conditional statement..

    I have tried the code without conditional statement, it then shows me all the records and there schedule end date too in the email.

    I'm confused may be it's having some issue in checking the OPtion Set Value .

  • Suggested answer
    cloflyMao Profile Picture
    25,210 on at

    Hi Fariha,

    1. Check whether Status reason is Error after went live marketing email.

    pastedimage1579156125346v1.png

    An error status email couldn't be available even if it passed error check.

    (Or did the email stuck in Goving live status?)

    2. Execute Xrm.Page.getAttribute().getOptions() in browser console for your tv_addtoemail field,

    check whether 772480000 would a valid value in listed options. 

    pastedimage1579156740933v2.png

    3. Have you tried removing date field and keep conditional statement to test again?

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Manoj - ManoVerse Profile Picture

Manoj - ManoVerse 108 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 63

#3
Chris1968 Profile Picture

Chris1968 20

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans