Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Email Template - Editing Inserted Values

  • 1.  Email Template - Editing Inserted Values

    SILVER CONTRIBUTOR
    Posted Oct 25, 2019 08:58 AM
    Hi all,

    We want to do some simple modifications on an email template
    Instead of inserting a date value in the format dd/mm/yyyy I want to insert the month in text format.
    Is it possible to do so in a standard email template?

    Current output: 01/01/2019
    Required output: January

    Regards,
    Sean

    ------------------------------
    Sean O Malley
    AIG
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: Email Template - Editing Inserted Values

    TOP CONTRIBUTOR
    Posted Oct 25, 2019 12:16 PM
    Edited by Rex Kenley Tan Oct 25, 2019 12:17 PM
    Sean

    You need to use MMMM

    https://www.magnetismsolutions.com/blog/colinmaitland/2014/02/05/how-to-format-a-date-time-field-in-a-microsoft-dynamics-crm-mail-merge-template-to-exclude-the-time-

    ------------------------------
    Rex Kenley Tan, MCSD: App Builder
    Tallmadge OH
    https://www.youracclaim.com/users/rex-kenley-tan

    *Always be CURRENT with JavaScript & C#, NEVER be obsolete.

    DISCLAIMER: All views expressed on this site are my own and DO NOT represent the opinions of ANY entity whatsoever with which I have been, am now, or will be affiliated.
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: Email Template - Editing Inserted Values

    SILVER CONTRIBUTOR
    Posted Oct 29, 2019 07:49 AM
    Thanks Rex,

    I reviewed that article but it's specifically for Mail Merge Templates and I'm trying to edit email templates which don't have the "Toggle Field Codes" option
    I came across this article in the meantime but it seems to be out of date and I wasn't able to get it working.

    Any other ideas would be welcome.

    Regards,
    Sean

    ------------------------------
    Sean O Malley
    AIG
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: Email Template - Editing Inserted Values

    TOP CONTRIBUTOR
    Posted Oct 29, 2019 02:45 PM
    Edited by Rex Kenley Tan Oct 29, 2019 02:57 PM
    Sean

    Wow, this actually turned out to be quite painful. I couldn't even find the official documentation for the template xml.

    At this point I would suggest just adding a plain text field that will hold the date in the format that you want. You also need to keep it in synch with the date field with either a plugin or js. I know this is a poor solution, but it's the only way considering crm365 IRONFIST grip on email template fields.

    If you have a developer, you can also create your own more robust email templates using open source projects like pug, handlebar or liquid.

    Cheers!

    Ps.

    What version of crm are you using?






    ------------------------------
    Rex Kenley Tan, MCSD: App Builder
    Tallmadge OH
    https://www.youracclaim.com/users/rex-kenley-tan

    *Always be CURRENT with JavaScript & C#, NEVER be obsolete.

    DISCLAIMER: All views expressed on this site are my own and DO NOT represent the opinions of ANY entity whatsoever with which I have been, am now, or will be affiliated.
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 5.  RE: Email Template - Editing Inserted Values

    SILVER CONTRIBUTOR
    Posted Oct 29, 2019 03:41 PM
    We're online - just got October Wave 2
    I was thinking a new field might be the only way to do it.
    I'll add in a quick workflow to populate a text field when the date field is created/changes as the value isn't change frequently.

    Thanks for looking in to this.


    ------------------------------
    Sean O Malley
    AIG
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 6.  RE: Email Template - Editing Inserted Values

    TOP CONTRIBUTOR
    Posted Oct 30, 2019 04:29 AM
    Sean - Workflow Elements by Aiden Kaskela has a Convert Date to Custom Text action designed specifically for something like this.

    https://kaskelasolutions.com/activity-format-a-date-and-time/

    ------------------------------
    Donal McCarthy
    Digital Marketing Administrator
    BrightWork
    Galway
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role