Full Locations Hierarchy - to tidy up the default cmn_location table

Chris Andrews
Tera Contributor

Do you find the out-of-the-box list of regions, countries, states/provinces, and cities in our beloved platform a little rough around the edges? Yes, fellow ServiceNow addict, I do as well.  When I am preparing for a demonstration, I like to select the Locations where my prospective clients live and work.  This can help them identify with the solution and visualize themselves using it.

 

Safe Harbour statement:  if you rely on the OOTB ServiceNow demo data, this might not be for you.  This is for convenience only and I provide no warranties or guarantees.  Delete or modify records at your peril.  Test this is in a sub-prod instance before committing!

 

  1. Clear the parent value from all records in cmn_locations.
  2. Delete all records from cmn_location.  Note:  even after removing demo data from an instance, there will be transfer order, asset, and consumable records associated with stockrooms and warehouses which are tied to certain locations. You'll have to clear the stockroom from the various assets to fully cleanse the cmn_location table.
  3. Load, preview, and commit the attached Location_Updates.xml update set. This creates a form and list view called 'Hierarchy' and adds the 'County' and 'Territory' location type choices.
  4. Return to cmn_location and import Full_Location_Hierarchy.xml.

You'll find some of the locations are missing the longitude and latitude values.  I compiled this list manually one day a couple of years ago and did not know how to use the platform to autogenerate the coordinates.  I still don't, but I will eventually do it when the need arises.  For now, enjoy this new list!  And apologies for any misspellings, errors, or omissions.  Please correct as you see fit in your own instances.

 

ChrisAndrews_0-1744206801614.png

ChrisAndrews_2-1744206842620.png

 

Chris Andrews

USDM Life Sciences

You know the drill... if you liked this, mark it as helpful!

0 REPLIES 0