- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2022 11:09 AM
I've written a number of custom apps where I've stuffed custom app configuration settings in sys_properties table. What would be the more contemporary design model to store custom app settings in ServiceNow as I want to avoid using sys_properties for custom app settings.
I would prefer to configure my custom apps to use something like app engine guided setup (guided_setup.do), or a single configuration page for settings (without using sys_properties). Can someone point me in the direction to documentation or a design model to do something like this?
Thanks!
Jason
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 09:52 AM
That totally makes sense.
There is an 'Ignore cache' checkbox on System Properties that you can check to prevent the cache flush when changing a property. Probably want to consider this for minor system properties you are creating for custom apps.
Regarding credentials - I would definitely advise keeping the stored in Connections & Credentials. If you do use a system property, it should only be to store the sys_id of the Credential record you want to refer back to.
For Guided Setup... it's not really documented on how to build your own, but it is very easy to deconstruct and build your own. I have done it for several custom apps. The first step is to edit the "Guided Setup" Application menu. In the related list at the bottom for Navigation Modules, you'll see there are a few Nav Modules that are restricted to just the 'maint' role. You can actually edit these so they are also accessible by the 'admin' role. That will make them more useful to you for building your own Guided Setup pages. Just make sure you are in the target App Scope for your app when creating the Guided Setup content.
Using Guided Setup can be a good way for guiding an application admin for setting up initial system properties for an app.
I would lean more towards using Guided Setup than a UI Page as I would consider it faster to setup and easier to maintain. A custom UI Page is going to start going down a road of coding that may take longer and increase technical debt. It might be harder to maintain in the long run for any of your admins or developers that might not be as familiar with the syntax that goes into a UI Page.
--------------------------------------------------
Workflow Cowboy
LinkedIn: https://www.linkedin.com/in/dalestubblefield/
YouTube: https://www.youtube.com/@starlordnow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2022 12:41 PM
What are your reasons to stop storing them in [sys_properties]? I consider it a great place to store configuration settings for an app.
For example
- Is it because of the experience of updating the values for a certain type of user?
- Is it because you have concerns about reloading the cache when values change?
- Is it because you need to walk a user through setting up initial values?
Have you already considered making a System Properties module for your app?
A better example of this can be found in any system by editing the Navigation Module for "Service Portal -> Properties". It creates a dynamic page based on the Category of the property.
--------------------------------------------------
Workflow Cowboy
LinkedIn: https://www.linkedin.com/in/dalestubblefield/
YouTube: https://www.youtube.com/@starlordnow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 09:20 AM
Hi Dale,
Thank you for your response!
That's exactly what I do currently (sys_properties with module/category). I'd prefer to 'step up' my configuration pages with UI pages for the following reasons:
1. there are sometimes I want application state but don't want to store them in sys_properties due to cache flush.
2. in the past I've used sys_properties to store credentials, but I would rather have them stored as a credential set for consistency across other applications.
3. I'm not wholly against using sys_properties.. that makes perfect sense for read-only values. But really what I'm trying to do is have a cleaner 'configuration page' module (ui page likely) which looks like single configuration page to the application admin but I have more flexibility where I store those configuration settings (table, sys_properties, credential set).
I do think that sys_properties and categories have their place for smaller applications. I think for more polished custom apps I would like to explore options like guided setup or UI pages to clean up the user experience, and also to add some validation logic to the process (like test ui action to validate credentials and endpoint work).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 09:52 AM
That totally makes sense.
There is an 'Ignore cache' checkbox on System Properties that you can check to prevent the cache flush when changing a property. Probably want to consider this for minor system properties you are creating for custom apps.
Regarding credentials - I would definitely advise keeping the stored in Connections & Credentials. If you do use a system property, it should only be to store the sys_id of the Credential record you want to refer back to.
For Guided Setup... it's not really documented on how to build your own, but it is very easy to deconstruct and build your own. I have done it for several custom apps. The first step is to edit the "Guided Setup" Application menu. In the related list at the bottom for Navigation Modules, you'll see there are a few Nav Modules that are restricted to just the 'maint' role. You can actually edit these so they are also accessible by the 'admin' role. That will make them more useful to you for building your own Guided Setup pages. Just make sure you are in the target App Scope for your app when creating the Guided Setup content.
Using Guided Setup can be a good way for guiding an application admin for setting up initial system properties for an app.
I would lean more towards using Guided Setup than a UI Page as I would consider it faster to setup and easier to maintain. A custom UI Page is going to start going down a road of coding that may take longer and increase technical debt. It might be harder to maintain in the long run for any of your admins or developers that might not be as familiar with the syntax that goes into a UI Page.
--------------------------------------------------
Workflow Cowboy
LinkedIn: https://www.linkedin.com/in/dalestubblefield/
YouTube: https://www.youtube.com/@starlordnow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 02:40 PM
Thanks Dale,
Many nuggets of wisdom in your response, thank you!
-JL