Limitation on extending Task table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2017 05:07 AM
So I heard that in any given instance, we're allowed a maximum of 1000 columns that extend the task table. I also heard that in order to find out how many you're currently at, you need to submit a ticket to HI and ask them.
I wrote this script, which I believe, should provide the answer:
var gr = new GlideRecord('sys_db_object');
gr.addQuery('super_class', '29c117436f0111007906db3bbb3ee4f4'); // sys_id of Task table
gr.query();
var tables = 0;
var columns = 0;
while(gr.next())
{
tables++;
var gr2 = new GlideRecord('sys_dictionary');
gr2.addQuery('name', gr.name);
gr2.query();
while (gr2.next())
{
if (gr2.element.indexOf("u_") == 0)
columns++;
}
}
console.debug("Tables: " + tables);
console.debug("Columns: " + columns);
I personally get:
Tables: 38
Columns: 230
Can someone confirm whether my code is accurate or if I'm missing something?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2017 05:29 AM
Looks good. Just a suggestion on how to make this a little cleaner, check out TableUtils:
Specifically the getTableExtensions() method.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2017 07:16 AM
Ha, nice! Never knew about TableUtils().