Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Email template results in empty field data

  • 1.  Email template results in empty field data

    GOLD CONTRIBUTOR
    Posted 11 days ago
    I have a wonky issue that I can't seem to figure out but maybe the super smart folks here can point me in the right direction. :) We are running on-prem, 8.2.

    Using the Cases entity, I have a workflow that kicks off emails (using an Cases based email template) to a specified contact when a condition is met. Email kicks as it should however the data fields are blank when the email arrives. Specifically, contact data. All the other fields work as expected but I can't for the life of me figure out why these fields are empty.  I've added a variety of fields to see if any of them stick... they don't.

    The email template....
    Banned Customer CRM Template

    The resulting email....
    Email results


    I've confirmed against the contact form itself that I am using the right fields...
    contact form properties
    The contact form with data... 
    contact form with info


    Any idea why the fields aren't pulling the data in when the email actually gets to my inbox? I'm not sure what to even call this strange issue to try and find resources to help fix it. :P  Thanks for any insights you all might have. :)

    ------------------------------
    Gretchen Garcia
    IT Technician
    Denver Public Library
    Denver CO
    ------------------------------


  • 2.  RE: Email template results in empty field data

    SILVER CONTRIBUTOR
    Posted 10 days ago
    Hi Gretchen,

    One idea would be to create a solution containing just that template, export it as unmanaged and see inside 'customizations.xml' if you see any difference between a 'good' field and a 'bad field' inside the template body. That may give a clue of what's going on. Make a copy of the original solution in case you try to re-import it after making some changes - just in case ;)

    ------------------------------
    Fabien Bernard
    CRM Developer
    Montréal QC
    ------------------------------



  • 3.  RE: Email template results in empty field data

    GOLD CONTRIBUTOR
    Posted 10 days ago
    Edited by Sissy Bottcher 10 days ago
    Could it be that the relation between "Case", "Incident" and "Contact" that you are assuming is somehow faulty?


    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    StudyPortals
    San Diego CA
    ------------------------------



  • 4.  RE: Email template results in empty field data

    GOLD CONTRIBUTOR
    Posted 10 days ago
    Maybe it's faulty but I don't know how to check that. (Yay for being a newbie!) :P  We haven't done a whole lot of tweaking in the grand scheme of things. If I click the lookup, I can find any contact in there that exists in the system as well as make new ones. Do you have any suggestions on what to check?

    ------------------------------
    Gretchen Garcia
    IT Technician
    Denver Public Library
    Denver CO
    ------------------------------



  • 5.  RE: Email template results in empty field data

    SILVER CONTRIBUTOR
    Posted 10 days ago
    My suggestion would then to open a ticket with Microsoft, this is clearly not the expected behavior and we already had some issue that only them could have fixed on the backend (like missing Target for lookup in some metadata tables). When you buy a car, you don't have to fix the motor by yourself  :)

    ------------------------------
    Fabien Bernard
    CRM Developer
    Montréal QC
    ------------------------------



  • 6.  RE: Email template results in empty field data

    SILVER CONTRIBUTOR
    Posted 10 days ago
    Edited by Fabien Bernard 10 days ago
    @Sissy Bottcher I was thinking more about a syntax or extra character issue that would not appear in the template designer but that we could see in the xml definition of it.

    ------------------------------
    Fabien Bernard
    CRM Developer
    Montréal QC
    ------------------------------



  • 7.  RE: Email template results in empty field data

    GOLD CONTRIBUTOR
    Posted 10 days ago
    It seems like this is your issue here https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/216358/how-to-use-a-contact-field-for-an-email-case-templates

    Since you want to add the Library Card number of your contact you might run into troubles. It might be better to abandon the use of a "template" altogether and just build the email message in the workflow directly​: https://ledgeviewpartners.com/blog/dynamics-crm-e-mail-workflow/

    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    StudyPortals
    San Diego CA
    ------------------------------



  • 8.  RE: Email template results in empty field data

    SILVER CONTRIBUTOR
    Posted 9 days ago
    Hi Sissy,

    Good catch!
    This is very misleading as the system allows you to select something that is actually not handled.
    And this is not even documented by MS here https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/create-templates-email

    You will be able to access to the contact's fields through the relationship Customer (Contact). (Customer field in case can be either an account or a contact, so there are 2 relationships with this field)

    Here is a capture of the email creation inside a workflow (We renamed Customer by 'Merchant', but it is the same 'customerid' field.)

    Email Template


    ------------------------------
    Fabien Bernard
    CRM Developer
    Montréal QC
    ------------------------------



  • 9.  RE: Email template results in empty field data

    GOLD CONTRIBUTOR
    Posted 9 days ago
    Holy moly good catch Sissy. I modified my template and we do get a contact but it's the dummy account we set up.

    Any idea on how to get the Associated Contacts we put into that sub grid into the email?  The cases / incidents setup we have is kind of complicated (hence the dummy account)... We don't want / need the staff member reporting the incident to be the main contact as once it's submitted their job is done.  What I really need to capture is that sub grid of people(s) and add them into the email. It is a contact look up thing... It seems like we're so close and yet - can't figure out what the magic words are. :P

    Completed form showing associated people
    And the form editor...
    incidents form editor


    ------------------------------
    Gretchen Garcia
    IT Technician
    Denver Public Library
    Denver CO
    ------------------------------



  • 10.  RE: Email template results in empty field data

    GOLD CONTRIBUTOR
    Posted 9 days ago
    If you have several associated contacts you'll have to use Microsoft Flow to set this up. Workflows don't support 1:N relationships in this way. Here's a bit more info: https://www.powerobjects.com/blog/2018/10/02/microsoft-flow-dynamics-365-customer-engagement/

    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    StudyPortals
    San Diego CA
    ------------------------------



  • 11.  RE: Email template results in empty field data

    GOLD CONTRIBUTOR
    Posted 9 days ago
    Yikes.....  And we're on prem so Flow is out.... This is not a good development.....

    ------------------------------
    Gretchen Garcia
    IT Technician
    Denver Public Library
    Denver CO
    ------------------------------



  • 12.  RE: Email template results in empty field data

    GOLD CONTRIBUTOR
    Posted 9 days ago
    Sorry, I'm out of ideas. I'm afraid without coding you won't very far. Not sure if there is a way to solve this through JavaScript.

    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    StudyPortals
    San Diego CA
    ------------------------------



  • 13.  RE: Email template results in empty field data

    GOLD CONTRIBUTOR
    Posted 8 days ago
    No worries Sissy! I really appreciate the help and the insight you've shared. It's just not the answer I was hoping for. I will ask our guy if he can think of a way to do it with java script. Even if I can get our data gateway talking to CRM (that's a whole other adventure), it would probably be a while before I learned enough to make it work. So while inconvenient for staff, we're probably going to have to add a couple of extra fields to get the data or we just ask the required staff to log in and find the case and read over it for their duties. Thank you all again for this learning adventure. :)

    ------------------------------
    Gretchen Garcia
    IT Technician
    Denver Public Library
    Denver CO
    ------------------------------



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