web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Send email template by custom workflow

(0) ShareShare
ReportReport
Posted on by 1,562

Hello Team,

I want to send email template by custom workflow.

Now,email is send properly but instead of text i want to send email template .please guide me as soon .

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Abed Haniyah Profile Picture
    4,287 on at

    Hello Rahul,

    Simply when you add Send Email step at a work flow, you can select Use Template from the drop-down list :

    0508.1.png

    Then select the entity or the related entity, after this set the properties of the email and select the email template that you want :

    0508.1.png

    Hope this helps,

    Abed.

  • Suggested answer
    Hamzeh Zawahreh Profile Picture
    3,674 on at

    dear Rahul Tomar

    Open the workflow and find the step which is sending the email.

    enter image description here

    If it says "Create new message", it means email body and subject line is configured inside the workflow. Otherwise you will see Use Template . For email details, click on "view properties" to select yours template

  • Tin Profile Picture
    1,562 on at

    Thanks for reply .

    I want to call it via code i have used a custom workflow through that i have to sent a mail.So,instated if write a new mail text i want to use my existing mail templates.

  • Tin Profile Picture
    1,562 on at

    Thanks for reply .

    I want to call it via code i have used a custom workflow through that i have to sent a mail.So,instated if write a new mail text i want to use my existing mail templates.

    I dont want to sent it like that.

  • Verified answer
    Hamzeh Zawahreh Profile Picture
    3,674 on at

    hi, did you try this:

    rajeevpentyala.wordpress.com/.../sending-email-using-email-template-in-crm-2011

  • Suggested answer
    Hamzeh Zawahreh Profile Picture
    3,674 on at

    hi

    also see this, ti's may help you:

    Sample code to use Template’s content while sending mail using SendEmailReuquest  :

    nishantrana.me/.../sample-code-to-use-templates-content-while-sending-mail-using-sendemailreuquest-in-crm-2011

  • Tin Profile Picture
    1,562 on at

    Hello Hamzeh,

    Thanks for reply,

    My reqiument is same as defined here.

    rajeevpentyala.wordpress.com/.../sending-email-using-email-template-in-crm-2011

    but when i am try to do with it not happening anything.so can you please suggest me more.

  • Verified answer
    Hamzeh Zawahreh Profile Picture
    3,674 on at

    hi, did you check your email configuration that is right?

    can you send direct email without code?

    if yes try this code (it's more simple):

    // Create the ‘From:’ activity party for the email
    ActivityParty fromParty = new ActivityParty
    {
    PartyId = new EntityReference(SystemUser.EntityLogicalName, _userId)
    };

    // Create the ‘To:’ activity party for the email
    ActivityParty toParty = new ActivityParty
    {
    PartyId = new EntityReference(Contact.EntityLogicalName, _contactId)
    };

    // Create an e-mail message.
    Email email = new Email
    {
    To = new ActivityParty[] { toParty },
    From = new ActivityParty[] { fromParty },
    Subject = “SDK Sample e-mail”,
    Description = “SDK Sample for SendEmailFromTemplate Message.”,
    DirectionCode = true
    };

    // Create the request
    SendEmailFromTemplateRequest emailUsingTemplateReq = new SendEmailFromTemplateRequest
    {
    Target = email,

    // Use a built-in Email Template of type “contact”.
    TemplateId = new Guid(“07B94C1D-C85F-492F-B120-F0A743C540E6″),

    // The regarding Id is required, and must be of the same type as the Email Template.
    RegardingId = _contactId,
    RegardingType = Contact.EntityLogicalName
    };

    SendEmailFromTemplateResponse emailUsingTemplateResp = (SendEmailFromTemplateResponse)_serviceProxy.Execute(emailUsingTemplateReq);

  • Tin Profile Picture
    1,562 on at

    Thanks its working

  • Community Member Profile Picture
    on at

    Worked Thank you.  Hamzeh Zawahreh 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans