Hi all,
I have a requirement to add a date on the marketing email but there is no option to add the date dynamically on marketing module email designer, is there any way to do that ?
Thanks
Hi all,
I have a requirement to add a date on the marketing email but there is no option to add the date dynamically on marketing module email designer, is there any way to do that ?
Thanks
Could we add datetime in a condition ?
<!-- #if (gt this.createdon '2023-01-01') -->
?
thank you
Morning guys,
After literally sleeping on this, I have completely changed my mind on JavaScript. The code is fine, but it will always display the date of when the email is opened. So if the emails stays in a customer inbox for a few days, with JavaScript the date displayed will be the email opened date, rather than email sent (which feels very wrong and slightly creepy).
Thanks,
-DD
Thanks Clofly,
It is really helpful :)
Thanks Dilyana,
For the reply but in my case i want show this on email and it won't works with gmail and some other mail boxes
Hi Fariha,
As Dilyana suggested, javascript would be a simple way to display current date on marketing emaill,
and it might be blocked by different email service providers due to secutiy policy such as Gmail.
I suggest you could build a custom entity called Date Assistance, create one record of this entity to save current date,
then embed it in marketing email content as dynamic content and send to contacts,
the benefit is that the date text is actually processed by CRM back-end and will be regarded as just text element in marketing email,
and the potential disadvantage is that if your target contacts are far from your time zone(e.g: China to USA), you might need another record with time zone only date field to these contacts.
Steps:
1. In custom Date Assistance entity, create a calculated date and time field with NOW() function.
2. Create another field Sync Text Current Date, it will save formatted MM/DD/YYYY date and we'll work with this single line text field to be sent.(because I found that calculated field data won't be shown in marketing email from my test)
3. Build an on-demand workflow or recurring workflow (With methods below, you won't pay for 3rd party solution.):
Pure way:
https://blogs.msdn.microsoft.com/mvpawardprogram/2013/03/11/scheduling-recurring-workflows-in-microsoft-dynamics-crm-2011-online-and-on-premise/(tutorial video)
https://www.powerobjects.com/blog/2012/11/09/create-recursive-or-scheduled-workflows-in-crm/
Open source solution:
Create a simple console app and run it with Windows Task Scheduler:
to sync calculated current date to the text date field with formatted data.
4.1 Enable Change Tracking option for Date Assistance entity.(to be available as dynamic content entity in marketing email)
4.2 Enable the Date Assistance entity in Marketing data configuration. (to be available as dynamic content entity in marketing email)
5. Embed the field to marketing email content with Assist-edit
Result:
Regards,
Clofly
Hi @Asmat ,
I managed to do it with JavaScript and it works OK when you open the email in a browser. I am not convinced it would work in all mailboxes though, needs testing. I think different email providers (yahoo, hotmail, etc) or even users might have different policies on JavaScript..
The code I used was -
Thanks,
-DD