Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Data Fields Are Not Populated With Values In Email Template When Workflow Runs

Posted on by 131

Hi Guys,

I am having problem populating data fields in email template when workflow runs. I tested it also running the workflow on demand.

"Hello" is the only value appeared in the email.

I cant find similar issue over the internet. You're input is high appreciated. Thanks in advance.

Email Template

3348.email-template.png

Workflow

58143.Workflow.png

Properties

Custom-step.png

 

Code

1205.Code.png

*This post is locked for comments

  • Verified answer
    RE: Data Fields Are Not Populated With Values In Email Template When Workflow Runs

    The issue is now fixed. Thank you for this blog.

    www.daisychubb.com/.../creating-an-email-with-template-in-ms-dynamics-crm-2016.

    Thank you everyone for giving time answering my question. Cheers!

  • RE: Data Fields Are Not Populated With Values In Email Template When Workflow Runs

    5543.Create-email.png

    Our goal is to have the description filled up with the email template body that has data fields in it. 

    That is why description of the email is updated with the email template body in the code.


    I already run the workflow on demand. Email is created as expected.

    Note: This set up is working before. Then suddenly it is broken. Data fields are not populated with values. There were no updates in the code.

  • Abby Kong Profile Picture
    Abby Kong 6 on at
    RE: Data Fields Are Not Populated With Values In Email Template When Workflow Runs

    Hi Euclides,

    The template is a contact template.

    This question may sound a bit unessary, can you please check the email in question has 'Regarding' field set to a contact record before above workflow step triggerd?

    Regards,

    Abby

  • talk2.gauravb Profile Picture
    talk2.gauravb 120 on at
    RE: Data Fields Are Not Populated With Values In Email Template When Workflow Runs

    Hi,

    I understand your process but there are couple of things which can cause this issue. In your workflow in first step you are creating an email and I trust you are creating email using the template itself. Here CRM creates email using "InstantiateEmailRequest" which replaces all dynamics value. If you are doing this then why you are updating the email's description field in workflow. As a debug process can you please remove your custom step and run the workflow to check the email is getting created correctly or not. 

  • RE: Data Fields Are Not Populated With Values In Email Template When Workflow Runs

    It is part of the process to setup first the email before sending. That code used to be working. I did not change any in the code. But suddenly we encountered this issue.

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Data Fields Are Not Populated With Values In Email Template When Workflow Runs

    Hi,

    by the way you can use below method to send email with template, any reasons you want to send it with code?

    0647.15.PNG

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Data Fields Are Not Populated With Values In Email Template When Workflow Runs

    Hi,

    it seems something is wrong with your code. you are using different method to send the email with template. Refer below code on how to send email with template.

    docs.microsoft.com/.../sample-send-email-template

  • RE: Data Fields Are Not Populated With Values In Email Template When Workflow Runs

    I created a new email template and workflow in IE but data fields are still not populated.

    But when I manually inserted the email template in the email, data fields are populated.

    I cant trace what seem the problem is.

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Data Fields Are Not Populated With Values In Email Template When Workflow Runs

    Hi Euclides,

    to check this , i would first ask you try to simply go to the entity for whichh you have created this record and add an email from there and insert this template and see if you get the values.

    if you dont see values - try to create a fresh template or re-create the content as Alex suggested above.

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Data Fields Are Not Populated With Values In Email Template When Workflow Runs

    Hi,

    I will try to remove it and add again .  I recommend you to use IE to add the dynamics value.

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

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans