Custom Playbook Behavior – Unable to Close Current Activity on Parent Case Closure

akashyenkur
Tera Expert

Hi Team,

 

I have developed a custom Playbook in PDI and aim to ensure that all Playbook activities are cancelled if they are in progress when the associated Parent Case record is either closed or cancelled. In such scenarios, all Playbook stages should also be cancelled. However, the current implementation cancels all stages and activities except the one currently in focus. I would like to know if there is a way to close this active activity as well, as illustrated in the screenshot and code provided below.
Note: I have already tried the OOB API, but it is also not working.
cancelPlaybooksByParentRecord(current);

 

CSM Workspace:

akashyenkur_1-1766393588010.png

 

BR:

akashyenkur_0-1766393288700.png

akashyenkur_2-1766393605902.png

 

Script Include:

akashyenkur_3-1766393652119.png