
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Starting from scratch. Building from the ground up. Sometimes, there's no way around it. We believe in sparing you from expending unnecessary effort whenever possible. For example, when you want to create a new table for a new application you are building; you may want to look at extending an existing table instead. In this fifth installment of our best practices series, we take a closer look at how leveraging an existing table may be more efficient than creating a new table.
Why extend an existing table instead of creating a new one
The ServiceNow platform comes with a robust and thoroughly tested collection of tables, fields, and related scripts to serve a wide variety of needs. For example, the Task [task] table provides functionality to manage the state of a request for work, including fields that store the state and reference fields that store who is working on it. The Configuration Item [cmdb_ci] table should be used as the base for any new CIs, while the User [sys_user] table contains details of people.
As shown below, the Task table is a parent table to Incident, Problem and various other tables in the system.
Extending a base table incorporates all the functionality of the original table—including fields and scripts—into the new table. This inheritance is used to create major subcategories of data. Extending an existing table can save a lot of development and debugging time.
Determine if a new table or an extended table is more efficient
To decide whether to create a new table or extend an existing one, you may want to review the list of tables in the system. Navigate to System Definition > Tables, which displays not only whether the table is an extended table (Extends table column), but also whether it can be extended as well (Extensible column). In the example below, we've outlined the Alias table, which extends the Configuration Item table, and is extensible itself (Extensible = true). You can extend tables that are marked as extensible if they are in the same scope or if they allow configuration from other scopes.
To create an extended table, click New on the Tables list page, and select the table to extend from the Extends table search field. Note that this option is only available when creating a table, as it incorporates all of the fields of the original table and creates system fields for the new table.
Table development best practice
Instead of creating a new table, consider extending an existing one. If an existing table contains fields, attributes, and scripts similar to those you need, extend that table rather than creating a new one. Then modify the components of your extended table, as needed, to tailor its functionality to the new need.
If you are extending the Task table, you may need a Platform Runtime license to cover the new application you are building. Contact your ServiceNow representative for more details.
--
Behind the scenes here at ServiceNow, the Knowledge Management team works closely with subject matter experts to disseminate critical information to our customers. We've found that certain topics come up frequently, in the form of best practices that can help you keep your ServiceNow instances running smoothly. This series aims to target those topics so that you and your organization can benefit from our collective expertise.
See Annotate scripts and customizations with comments for the first installment on script comments.
See Limit the Number of Users with the Admin Role for the second installment on user roles.
See Where to avoid linking to a reference field when configuring a list for the third installment on list configuration.
See Developing on your production instance for the fourth installment on development.
To access all of the blog posts in this series, search for "nowsupport best practices series."
- 27,782 Views
- « Previous
-
- 1
- 2
- Next »
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.