ServiceNow Application Development
上QQ阅读APP看书,第一时间看更新

Extending the Task table

In order to create a table that extends from the Task table, we need to select the Task table as the Extends table that extends from it while creating a new table. Once a table has been created, it is not possible to change or specify a table to extend from. Extending the tables helps in reusing the fields and other features already defined in the parent class, and make them available in the child classes:

  1. Open the Tables module and click on the New button at top of the content frame to open the New record form.
  2. Enter the label of the new table as POS Tasks and select Task as the Extends table.
  3. Ensure that the Create module and Create mobile module checkboxes are checked.
  4. Finally, select the previously created POS app menu as the value of the Add module in the menu. This will ensure that the new modules that will be created will be added to the selected application menu:
  1. Open the newly created table record in the Tables module and ensure that the columns from the Task tables are all available in the POS Tasks table, as shown in the following screenshot:

These columns are available in the Task table, and thus making changes to any of these columns will make the changes available to all the tables in the instance that is extending the Task table, unless the attributes of the extended columns are explicitly overridden.

It is also possible to add custom columns using the same steps explained previously under the topic Adding columns. The columns we add to the POS Tasks tables will not be available to the tables that are extending the Task table.