Where does getApprovers pull from?

omnikb
Kilo Contributor

I am attempting to modify some custom work done by someone no longer at the company.   The Knowledge Management process uses a "getApprovers" javascript command in the Knowledge Management - Publish workflow.   So far, only the System Administrator can approve knowledge articles; I need multiple people (preferably an established group) to have the ability to review and publish articles.   Thoughts?

1 ACCEPTED SOLUTION

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

That activity is calling new KBWorkflow().getApprovers(current);



Typically anything that starts with "new X" is a script include.   Navigate to System Definition and search where name = KBWorkflow.   There you will find a few records and one that ends with SNC.   The KBWorkflow extends KBWorkflowSNC and there you will find the getApprovers function.



It is basically navigating to the knowledge base record and getting the owner and managers and adding them as approvers.


View solution in original post

4 REPLIES 4

prasad48
Tera Guru

You can Change the workflow as you required. Instead of modifying the OOB script you can add your own activities


Michael Ritchie
ServiceNow Employee
ServiceNow Employee

That activity is calling new KBWorkflow().getApprovers(current);



Typically anything that starts with "new X" is a script include.   Navigate to System Definition and search where name = KBWorkflow.   There you will find a few records and one that ends with SNC.   The KBWorkflow extends KBWorkflowSNC and there you will find the getApprovers function.



It is basically navigating to the knowledge base record and getting the owner and managers and adding them as approvers.


Much appreciated, Michael.   Is this where I would add Managers to the Knowledge Base?


Knowledge Base.PNG


Yes that out of the box function gets the list of users from the Managers field.   Of course you can complete configure this to something else as well if this doesn't work for you.