Hello, I have a case containing 2 tasks.
I would like to set up an automated system to determine the status of a case on the basis of the statuses of 2 associated tasks.
Here is the use case, When a user updates the status of a task, 1- retrieve the record ID of the task,
2- search for the case associated with the modified task on the basis of the record ID of the task,
3- search for all the associated tasks on the basis of the record ID of the case,
4- if all the tasks have a status of "Done", then the result status is "Done", otherwise it is "In progress",
5- update the status of the case with the result status on the basis of the record ID of the case.
I have configured a workflow and a custom function as follows:
(The business logic for calculating the result status has been simplified to make the code easier to read)
The result was inconclusive.
Any idea what's wrong?