What objects are available to the script field on an order guide?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2020 08:54 AM
Does anyone know what objects are available to the script field on an order guide?
ServiceNow recommended I script the logic I need since the base rules don't support checks against user.roles. I need to figure out a way to check the current variable values, before determining what items to add to the order guide.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2020 09:12 AM
In you are talking about conditions in rule base, then you can use server side objects in condition of rule base.
Also, it depends on your order guide variables.
e.g if you have reference variable in order guide, you can use this reference variable with advanced qualifier condition to call script include in your rule base condition.
Take a look below for advance reference qualifier
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2020 09:12 AM
Hi Sachin, thanks for taking the time to reply. I'm not referring to the conditions in the rule base, I'm talking about the script on the order guide itself.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2020 09:34 AM
You can configure catalog client scripts on order guide and from client script you can use GlideAjax as well.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2020 09:49 AM
Hi Bryan, "guide" is the object that can be used in the script field of order guide
The script field in an order guide can be used to add or remove catalog items to or from the order guide. It can be added to the order guide form by configuring the form layout.
- To add a catalog item that is not added to the order guide via a rule base, write the following code in the script field:
- <source lang="javascript">
guide.add(“<sys_id_of_cat_item>") </source>
- To remove a catalog item that is added to the order guide via a rule base, write the following code in the script field:
- <source lang="javascript">
guide.remove(“<sys_id_of_cat_item>") </source>
Hope this helps. Please mark it as correct and helpful, if applicable.
Thanks and Regards,
Ishita Shrivastava.