- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2018 06:34 AM
Hi ,
I have a requirement to create a custom scoped application but with a functionality that it should be attached to a property, if that property is made active than that application and all its module should be visible.
But if i make that property inactive than that custom application should get hide.
can we create a property which can handle visibility of custom application modules.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2018 05:59 AM
I agree with Brad - you might want to take a look at the Technology Partner Program if your goal is to distribute this application easily to many customers.
If this is just for a handful of other instances to be installed on, you could write a business rule on the sys_properties table that watches for the value to change. If it changes to false, then you go through and flip the active field on the application menu (no need to do it on all modules since they will automatically be hidden if the app menu is inactive.) If the value of your property switches to true, then your BR flips the application menu back in to service by setting active=true.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2018 06:37 AM
Module visibility is determined by the active flag on each module and the application menu itself. The property would not have any impact on this. You can also change the visibility of a menu and modules buy the rolls you associate with those menus and modules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2018 07:04 AM
Hi Chuck,
Thanks for your reply.
Actually we are trying to create an custom application as an plug and play, we want to develop functionality the way plugins works, when ever any plugin activated a application gets active.
So we are thinking to work by use of property when ever that property gets active our custom application should gets visible on left navigation panel.
Can this be possible in service now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2018 07:20 AM
Hi Chuck,
Can you please provide any input for BELOW thread, i raised a new question
Scriptable Order Guide and Service catalog script API both are not working in scoped application
Hi ,
I am trying to use scriptable order guide and service catalog script API methods to raise request automatically from business rule in SCOPED APPLICATION but both the ways are not working.
Service catalog script API code
var cartId = gs.generateGUID();
gs.addInfoMessage('111111111111111');
var cart = new Cart(cartId);
gs.addInfoMessage('22222222222222');
var item = cart.addItem('c5acfa32db581b043f68f9771d961938');
cart.setVariable(item,'select_roles','Query Manager Country');
cart.setVariable(item,'affected_user',current.sys_id);
cart.setVariable(item,'select_country','testtest');
cart.setVariable(item,'accept',true);
var rc = cart.placeOrder();
gs.addInfoMessage(rc.number);
Scriptable order guide code:
// var json = {"opened_by":a,"requested_for":a,"select_application":app};
// var gr = new GlideRecord("sc_cat_item_guide");
// if (gr.get("name","UAM Deletion Process")) {
// gs.addInfoMessage(a+'1111111');
// var sog = new ScriptableOrderGuide(gr.getValue("sys_id"));
// gs.addInfoMessage(a+'2222222');
// var result = sog.process(new global.JSON().encode(json));
// gs.addInfoMessage(a+'3333333');
// if(!result)
// {
// gs.log("Processing the scriptable order guide failed with message: " + sog.getMessage());
// gs.addInfoMessage(a+'ansh');
// }
// else {
// var request = sog.getRequest();
NEITHER of the CODE is working can anyone please help here.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2018 06:38 AM
The menu applications and modules don't have conditions, they can either be made active/inactive or you can protect them with roles. You could make something like this work, but it wouldn't be very simple. Could you give a little more background on why you would be activating and deactivating this application?
You could do something like controlling the visibility of the menu items with a role, and then adding and removing the role from a group to control it.