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
Hi Fariha,
1. Check whether Status reason is Error after went live marketing email.
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.
3. Have you tried removing date field and keep conditional statement to test again?
Regards,
Clofly
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 .
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)
Regards,
Clofly
Holly Huffman
103
Muhammad Shahzad Sh...
96
Most Valuable Professional
Gerardo RenterÃa Ga...
51
Most Valuable Professional