There have been a few times that I have needed to create a table that extends a system table. However, Service-now.com doesn’t allow the extension of some of their system tables through the UI. I have found a way to do this programmatically.

Please use good judgement on this since there was probably a good reason for dis-allowing the extension of system tables.

1
2
3
4
5
6
7
8
9
10
11
//First line creates the table
// parameters:
// - Table Name
// - Table Label
// - Add sys fields (created by, updated, etc...  make false when extending since they already exist)
// - extended table (just make it an empty string if not extending any table

var newtable = new Packages.com.glide.db.TableCreateUtil.create("u_eloqua_field_import", "Eloqua Field Import", false, "sys_import_set_row");

// This saves what you did in an update set.
new Packages.com.glide.update.saver.TableUpdateSaver(newtable, "").save();