sc_req_item_stageGetChoices - global business rule

burgesm
Kilo Contributor

Can anyone please point me to where this global business rule is being called.

The rule runs a function that displays request item stages based on either a workflow or execution plan.

I can't seem to locate any script / script include or business rule calling the script.

Regards

4 REPLIES 4

geoffcox
Giga Guru

Where is this script that you're asking about? I would expect something that displays things to be called from a client script, UI script, or UI page.


Wiki:


http://wiki.servicenow.com/index.php?title=WorkflowStages#gsc.tab=0



I also found this in a service portal widget ("Requested Items"):


/sp_config?id=widget_editor&sys_id=624afdb3d7230200a9addd173e24d4f4



// get appropriate Stage choices for this requested item


var cl = new GlideChoiceList();


GlideController.putGlobal("answer", cl);


GlideController.putGlobal("current", gr);


sc_req_item_stageGetChoices();


Hi @Daniel,


the business rule name is sc_req_item_stageGetChoices



https:// yourDevInstance.service-now.com/nav_to.do?uri=/sys_script_list.do%3Fsysparm_query%3DscriptLIKEsc_req_item_stageGetChoices%26sysparm_first_row%3D1%26sysparm_view%3D


Thais Pulliam2
Giga Expert

Hey There! I am not sure if you are asking where it is defined, or where it is being used. So I will answer both.

1) To find it, just go on the menu System Definition > Business Rules. Then use filter: Name IS sc_req_item_stageGetChoices

2) If you would like to know where is being used, it would be on the Requested Items Widget on Service Portal. In this line of code, on the server script:

var cl = new GlideChoiceList();
GlideController.putGlobal("answer", cl);
GlideController.putGlobal("current", gr);
sc_req_item_stageGetChoices();