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

AkkiYen
Tera Contributor

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

 

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@AkkiYen 

there is an extra table involved if you wish to complete via script

check this link

Complete an activity via a script in the playbook 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader