Creation of new table is forcing "undefined" into the name



The creation of a new table is forcing "undefined" into the name


All versions


1. When creating a new table, the OOB client script "Table Label Change" on sys_db_object is used to auto-populate the "name" when the label is edited.


2. The script passes a parameter "g.scratchpad.scope" (scope of the record) to a js function "setTableNameFromLabel" (on generate_table_name_with_scope.js) which returns the name.

3. The OOB on-display business rule "Set Current Record Scope in scratchpad" on sys_metadata is used to set the "g_scratchpad.scope" parameter value for the record.


4. If the above business rule is deactivated or deleted, then the value of "g_scratchpad.scope" is undefined which causes the js function to return the name with "undefined" in it.


Reverting the business rule back to OOB version should fix the issue. Tables already created with "undefined" in the name can be deleted using TableUtils API.

Additional Information

This can also happen if any other custom script on sys_metadata or sys_db_object is updating the value of "g_scratchpad.scope" parameter to undefined. If so, the custom script can be modified so that the parameter is not set to undefined.