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
Rick MacGuiganRick MacGuigan 

create a task from an object using process builder

I have acustom object (Audit) that should have a customer task record type called Scheduled Audit. Normally the Scheduled Audit task is created before the Audit and is used to pre schedule the actual audit. However, in the event the Scheduled Audit task does not exist and the Audit is created and saved I need to iterate over the activity related list to see if a Scheduled Audit exist. If this particular Schedueld Task record type is not found in the related list then create one. 

Is it possible to use process builder to iterate over the activities of the Audit object looking for a Scheduled Audit record ? If it does not find it then create a Scheduled Audit task 'related to ' the Audit object. 
Best Answer chosen by Rick MacGuigan
Rick MacGuiganRick MacGuigan
Thanks @Gaurav. I hope flow improves. Process builder is so much more intuitive. 

All Answers

Gaurav HandooGaurav Handoo
Hi Rick

Iterating through non-related records via Process Builder will not be possible. However, you can use Flows to achieve the same, including creation of Scheduled Task record, in case there is no record existing.

Hope this helps. Please mark as best answer if it does.

Cheers!!

Gaurav
Rick MacGuiganRick MacGuigan
Thanks @Gaurav. I hope flow improves. Process builder is so much more intuitive. 
This was selected as the best answer