John Zhang1
Kilo Patron
Kilo Patron

As a ServiceNow developer it is very important to know what is a list of table extensions, or parent before you start your configuration and coding to eliminate custom change so you can use ServiceNow out-of-box (OOB) as possible.  

I would like to introduce two easy way to find a list of table extensions, or parent below:

Method One using TableUtils()

We are going to use "Script - Background" to get a list of table extensions, or parent:

  1. Review a list of table extensions find_real_file.pngResults: total 15 extended tables is displayedfind_real_file.png
  2. Review a list of table parentsfind_real_file.pngfind_real_file.png

Method Two using sys_db_object

  1. Review a list of table extensions, or parents
    • Search sys_db_object.list via Filter Navigator find_real_file.png
    • Search "HR Case" on Extends table filed and then a list of table extensions will be displayed
    • find_real_file.pngfind_real_file.png
    • Display HR Case record by clicking "HR Case" under "Extends table" so you can see a parentfind_real_file.png
    • find_real_file.png

 If you are good for script, I recommend to use TableUtils() method, but if you are not good for script, you can use sys_db_object.list method.  One most advantage of TableUtils method can review a list of all related parent, but sys_db_object.list method can only get a direct parent.find_real_file.png

 

Comments
Lakshmi Royyala
Tera Contributor

Thanks. Another useful method for checking if a table was extended from Task table -- 

new TableUtils("param_table_name").getAbsoluteBase()

 

Ex: if (new global.TableUtils(current.getTableName()).getAbsoluteBase() == 'task' ) {

}

Version history
Last update:
‎01-08-2022 12:01 PM
Updated by: