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)

How to create a workflow that creates an activity?

(0) ShareShare
ReportReport
Posted on by 26

Hello,

I have a workflow setup that sends out an email to users when a certain field is changed to complete.  However, I need to add a step in the workflow to add an activity to the parent entity to show that an email was sent.  Is this possible, if so how?  (The parent entity is Opportunities and then I have a child entity underneath)

Thank you.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi USA80,

    If the instance you are using is not heavy on email activities, you could try the following:

    • Create a new workflow that, when an email status changes (as your trigger), add a check condition to see if the regarding is an opportunity and if the status reason of the email is Sent, then create the activity on the parent entity:

    Opportunity-email-waiting-workflow.jpg

    You could add in additional condition checks to see if the email subject contains a certain subject line.

    • Obviously when choosing to send an email, you cannot reference that email in other steps or conditions. Therefore, you might need to set it to create the email, then set its status reason to Pending Send in order to trigger its sending:

    Opportunity-email-waiting-workflow.jpg

    Then, waiting until its status is Sent (or wait 5-10 minutes), and create the activity for the opportunity if the email was indeed sent.

    Let me know if this helped.

  • USA80 Profile Picture
    26 on at

    The email that is being sent is coming from the child record, not the parent.  So does the above still work in this situation?  I also don't have an email status field.

  • Community Member Profile Picture
    on at

    Hi USA80,

    It should so long as there is a reference to the parent. If there is a reference, when creating the activity for the parent, simply put the parent of the regarding child record as the dynamic slug of the activities regarding lookup field. If there is no reference, then you may need to consider either adding the parent lookup to the email as a reference or creating a custom workflow to connect it.

    Out of the box Dynamics 365 Emails have two status fields, namely Activity Status and Status Reason. The status reason field will have the values: Pending Send, Sending and Sent.

  • USA80 Profile Picture
    26 on at

    I am on CRM 2016

  • Community Member Profile Picture
    on at

    Hi USA80,

    Those same fields exist on CRM 2013, 2015, 2016 and Dynamics 365.

  • USA80 Profile Picture
    26 on at

    I am on the child entity, and when I go into my workflow, I add a step for Create Record and select Task.  When the next window comes up, I don't see where I can select activity.  Am I doing this right?

  • Community Member Profile Picture
    on at

    Hi USA80,

    Could I ask for a screen shot, not sure I follow.

  • USA80 Profile Picture
    26 on at

    5100.Task.png

  • USA80 Profile Picture
    26 on at

    Process-with-Task-added.png

  • Community Member Profile Picture
    on at

    Hi USA80,

    As mentioned before, if you are going to use the Send Email step, you will not be able to reference it in later conditions or steps.

    If you are going to use the second option I gave you, it would need to look like this:

    Email-workflow-_2D00_-Second-attempt.jpg

    As stated before, creating the email as a record allows you to reference the email and any other activity. You will need to set the created emails status to Pending Send to ensure that it is sent.

    You will also need to be aware that conditions are instant checks. Emails, depending on your configuration, can take up to two minutes to send, meaning your create task will be created regardless of the email being sent or not.

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