Can I Call a catalog item from within another catalog item?

psenkow1
Giga Contributor

We have a catalog item to request access to jump servers.   As part of this, the requester needs to also tell them if they need access to a database(s) and what those are.

We have another catalog item that is to request access just to 2 specific databases.   These two databases require special work to be done (special approvals, etc.).

I would like to change the request for access to Jump Servers, such that IF they also request access to one of these 2 special databases, then it calls the catalog item for databases, and collects the information from that catalog item; adds it to Jump Server request, and puts all the information then into the request ticket.   I would rather not have to duplicate the variables on the database request, into the jump server request.

The reason for this is, if there is ever a change to the database request, we will only need to make the change in one place. Since the jump server request is calling the database request, the changes would be automatic in the jump server request.

Can anyone tell me if this is possible, and how to do it?

Your help is really appreciated.

1 ACCEPTED SOLUTION
16 REPLIES 16

Hi Rhonda,



Thanks for the update. As noted before, the RITM is created before the REQ, so you won't know what REQ to attach the NEW RITM to for a few seconds. That's where things get tricky.



Two suggestions at this point>


  1. Go back to the person requesting the mobile order guide functionality. Let them know this is not available OOB and that it will take some work to build and maintain going forward. Based on other customer feedback, keep things as close to "out of the box" as possible to avoid issues with upgrades and testing later. Let them make the decision of all that time and effort is going to pay off in the long run. You've done your research and it's not a trivial effort to make it do what you want it to. CAN it be done? Sure. But as a good friend of mine once said, just because something CAN be done, doesn't mean it SHOULD be done.
  2. Submit an enhancement request. Our product managers DO listen. Enhancement requests: Tell us how you would improve the ServiceNow product

Thanks Chuck - good advice.   It's not necessarily the customer asking for the Order Guide on mobile, but our leadership does not want us to create OnBoarding as an Order Guide (even though it's the perfect use case) because Order Guides can't be used on mobile; however, we are being encouraged to stay as close to OOB as possible so I will raise an Enhancement Request and we will likely try and find an acceptable workaround in the meantime


Hi Chuck



I tried Service catalog script API but as mine is a scoped application, I am getting below error



Error Message


java.lang.SecurityException: GlideGuid is not allowed in scoped applications



So can you advise how can it be achieved in case of scoped application?


prasad48
Tera Guru

am using below code



var cart = new Cart();


var item = cart.addItem(itemid);


cart.setVariable(item, "variable name", "value");





var rc = cart.placeOrder();


Now I am getting this error



Error Message


ReferenceError: "Cart" is not defined.



And when I used


var cart = new global.Cart();


var item = cart.addItem(itemid);


cart.setVariable(item, "variable name", "value");



It gabe the below error


Illegal access to private script include Cart in scope rhino.global being called from scope x_wadm_wdat_soe