How to delete the "u_" on creating a custom table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2020 05:38 PM
Hi All
Is it possible to create a custom table without "u_" when creating a table?
Regard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 12:36 AM
Through background script this possible, use below example script
example script :
var table_name = 'cmdb_ci_gcp_label', table_label = 'Google Label',
extends_table = 'cmdb_ci';
var attrsList = new Packages.java.util.HashMap();
var fieldName1 = 'Value';
var ca1 = new GlideColumnAttributes(fieldName1);
ca1.setType('string');
var fieldName2 = 'Project Id';
var ca2 = new GlideColumnAttributes(fieldName3);
ca2.setType('string');
ca2.setUsePrefix(false);
attrsList.put(fieldName1, ca1);
attrsList.put(fieldName2, ca2);
var tc = new GlideTableCreator(table_name , table_label);
tc.setColumnAttributes(attrsList);
if(typeof extends_table != 'undefined') tc.setExtends(extends_table);
tc.update();
Mark correct/helpful based on impact.
Thanks,
Naveen