cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if document has workflow?

e-no91
Champ in-the-making
Champ in-the-making
Hi,

What is the code in js to check if document has workflow, similar to using document.isContainer to check if document is a folder?

Thank you in advance!
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

using the <a href="https://wiki.alfresco.com/wiki/4.0_JavaScript_API#ScriptNode_API">ScriptNode API</a> you can get the workflows of a document by using document.activeWorkflows and then check the length of the array against 0.

Regards
Axel