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 workflow to create Task within a Task

(0) ShareShare
ReportReport
Posted on by 4,515

Hi All,

I have introduced concept of parent and child tasks. I created relationship between Task vs. Task and I add children tasks in parent task entity subgrid.

My question is now is that I want to do 2 steps:

1) Auto create a parent task when new account is created (I did that through Workflow)

2) Auto create 1 children task under parent task subgrid (I am having trouble figuring out how to create a workflow for this, maybe there is another way)
Any suggestions would be much appreciated!!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi Dony,

    For the second one (the children task), you link to the parent task as the custom relationship, not using regarding field right...

    Dony,

     

    You can create two workflows or two steps, but to easy maintenance I suggest to create 2 workflows

    First, create a workflow for Entity Account, triggered onCreate

    Steps: Create Task, set the properties, set the regarding field to the newly created Account.

    Save it first..

    Then create another workflow.

    ==========================================================

    Second workflow, create a workflow with Task entity as the main Entity, run as child workflow, uncheck all trigger, uncheck the ondemand as well.

    Just check the child workflow..

    Task5.png

    Then in the steps:

    Create a Task record...

    Then set the Properties, like Subject, description, all is as you want.

    Then the important things is the Regarding and the Parent Task field.

    If you want to set the Regarding to the Account, just set it, in the value, choose Task -> Regarding (Account)

    You might need check condition first to ensure that this task related to the account..

    Then the parent task, give the value to the Task itself.. (the input argument of it)

    task7.png

    Okay, save and activate it.

    Back to your first workflow, then now add more steps, start child workflow...

    Then do not forget to pass the parameter from the newly created Task.

    And choose your Workflow.

    So, now you have 2 workflows.

    FYI, You can either using my method, that is combine two workflow and start with child workflow method or you just create one main workflow and create two steps (by replacing the start child workflow to the steps) so you only have 1 workflow (just use the child workflow steps and copy them to the main workflow) or you create 2 workflow, first workflow then second workflow triggered once Task is created, then create another task.

    But, for this way, you need to specify a flag indicate that this is parent task created from workflow, otherwise your workflow will have infinite loop and cause problem. Because you are creating task after a task created and so on..you need to specify the flag from workflow 1 then in the workflow 2 must check condition first in order to avoid always create Task workflow everytime without stopping.

    I would suggest you to use child workflow fore more procedural workflow or creating a main big workflow with 2 steps.

    Hope this helps, Dony.

    Thank you.

  • donyc Profile Picture
    4,515 on at

    thanks!

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