Sometimes, there is a need to perform a particular task or action repetitively over a period of time. We were in a need to create a task activity after every 2 days against an account.
This can be done by creating child workflow and call it from the parent workflow. The child workflow would peform the actual job and the parent will call this child recurrsively.
Here are the steps to get this done:
-
Create a workflow for required entity (For eg: account) with following triggers
– On demand
– As a child workflow
– Record is created -
Set the scope of the Workflow as appropriate (For eg: organization)
-
Now the structure of workflow will be as follows:
First is wait condition which says, wait for 2 days after the execution of this workflow. This condition is as shown below:
After this condition is fulfilled, a task is created and then again child workflow is started which is the same workflow created above (i.e. test recurring). So, the workflow runs recursively and creates a task after every 2 days.