function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ishan Singh 4Ishan Singh 4 

I want a task to populate once a field on lead is marked true and when I mark the task as complete a followup task comes with same name until a check box is marked true on lead object

I have already tried process builder it's not working. 

Can you please suggest a code for this.
Thank you

ShirishaShirisha (Salesforce Developers) 
Hi Ishan,


This can be achieved by the autolauched flow using the Process builder.You can check the criteria on the process builder and create the task record from Flow using Record Create Component easily.

Also,please try the sample code which has given in the below document:

PS:you can add your own logic to insert the task.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Dave ShulmanDave Shulman
I would even go one step simpler than process builder if all you want to do is create a Task when a checkbox is checked.  Use Workflow rules to generate a new Task.  Give tasks created from this process a unique attribute from other tasks : like call them "Auto Follow Up" .  then create another workflow rule on the task that runs on subsequent meet when a task that contains Auto is marked completed.  should be super easy to develop