Extending CMDB Table Without Adding Fields/Columns

Nia McCash
Mega Sage
Mega Sage

Is there a best practice for extending a CMDB table, especially if no additional fields/columns are needed?   I see that this has been done OOB - Example: cmdb_ci_appl_vignette_server table extends the cmdb_ci_appl table but has no additional fields/columns.

I am thinking of doing something similar so that I can do an easy query to get all the CIs of a particular type, such as:
var gr = new GlideRecord('cmdb_ci_appl_my_custom_table');

The actual CI is modelling a contained space for a specific department within a shared wiki installation and the only attributes I currently need are the name of the Wiki space, "Managed By" and "Owned By".  

Have others done something similar/is this fairly common practice for ServiceNow?   What are the downsides of extending an OOB table without adding additional fields/columns?

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Nia,



Yes you can do this. It gives you the extensibility later if you DO need custom fields on your table.



The advantages are several such as the ability to use dictionary overrides to change default values, display values, reference qualifiers, etc.



The only downside I can think of is if someone else includes a field in the parent class that you don't necessarily want or need. That doesn't go away if you do NOT extend today, just something to be aware of.



Section 2 speaks to some of that here: http://wiki.servicenow.com/index.php?title=Modifying_the_Application_Design#gsc.tab=0


View solution in original post

2 REPLIES 2

Chuck Tomasi
Tera Patron

Hi Nia,



Yes you can do this. It gives you the extensibility later if you DO need custom fields on your table.



The advantages are several such as the ability to use dictionary overrides to change default values, display values, reference qualifiers, etc.



The only downside I can think of is if someone else includes a field in the parent class that you don't necessarily want or need. That doesn't go away if you do NOT extend today, just something to be aware of.



Section 2 speaks to some of that here: http://wiki.servicenow.com/index.php?title=Modifying_the_Application_Design#gsc.tab=0


Thanks Chuck!  



If anyone has any additional info/advice on the matter (cautions, gotchas, example scenarios, etc), please feel free to update this thread.