Friday, June 19, 2015

How to Promote a field in Service Now ?


This very common requirement in any Database to extend a table. Developers must be very careful when designing the DB tables and organizing the data. If you are already in middle of the development and encountered that there are more than one table need to share the same fields which are common in all the tables, then create a parent table and promote the commonly used fields into parent table, so that all the child tables can share the fields.


Syntax : 

GlideDBUtil.promoteColumn('table_to_move_from', 'table_to_move_to', 'field_to_move', true);


Example : Let's say I want to move 'category' field from 'incident' table to 'task' table
 GlideDBUtil.promoteColumn('incident', 'task', 'category', true);


Reference : http://www.servicenowguru.com/scripting/promote-field-extended-table-servicenow/

6 comments:

  1. interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new posts,Thanks a million once again, Regards servicenow training in hyderabad

    ReplyDelete
  2. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work..
    ServiceNow training in Hyderabad

    ReplyDelete