Deactivating / Retiring Departments

chaselong
Mega Expert

We've recently run into a situation where we need to retire some departments in ServiceNow. Unlike a lot of other tables (users, groups, etc...) I don't see an active field on the default department table. I want to preserve the departments since they are currently referenced in lots of areas like on requested item records, but I don't want them to appear anymore in lists and things like that. I thought about adding a custom Active checkbox and creating an on query BR similar to the "user query" business rule to basically hide the in active departments.

Has anyone ever done this and if so did it work as anticipated? Does anyone have another more elegant solution they've implemented?

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Chase,



You're on the right track. Two options that I see - the first is what you said. Create an Active field (true/false) and use a before/query business rule. The kicker is that it's going to filter for all queries on that table (unless you add a check to only filter for non-admin roles, etc.)



Option 2 is to also create an active field, then find all the references to that field and add reference qualifiers where necessary. While it sounds like more work, it's a bit more surgical.



It really depends if you want the default to be filtered and modify the BR to make exceptions, or make the default be unfiltered and have each field do the filtering.


View solution in original post

5 REPLIES 5

Chuck Tomasi
Tera Patron

Hi Chase,



You're on the right track. Two options that I see - the first is what you said. Create an Active field (true/false) and use a before/query business rule. The kicker is that it's going to filter for all queries on that table (unless you add a check to only filter for non-admin roles, etc.)



Option 2 is to also create an active field, then find all the references to that field and add reference qualifiers where necessary. While it sounds like more work, it's a bit more surgical.



It really depends if you want the default to be filtered and modify the BR to make exceptions, or make the default be unfiltered and have each field do the filtering.


Thanks Chuck. I think your idea about using reference qualifiers might be the better solution. The only place our general users really use the departments is in the service catalog, so I think it'd be easy to do active only reference qualifiers on the variables there, while not messing up anything like reports or analytics that non-admins may have setup.


Finding the references to the Department table shouldn't be too bad. From the dictionary, a quick filter brings up 22 fields.



find_real_file.png



You can do something similar on the Variables table.


Shrinidhi2
Kilo Contributor

For domain separated instance, it would not be possible to edit the dictionary.

Please suggest.