Skip to main content
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

  • Suggested answer
    cloflyMao Profile Picture
    25,208 on at
    RE: Marketing Email Dynamic Content Option set is not working

    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

      

  • Fariha Asmat Profile Picture
    216 on at
    RE: Marketing Email Dynamic Content Option set is not working

    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 .

  • cloflyMao Profile Picture
    25,208 on at
    RE: Marketing Email Dynamic Content Option set is not working

    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

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Holly Huffman Profile Picture

Holly Huffman 103

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 96 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Product updates

Dynamics 365 release plans