Friday, June 19, 2015

Challenges in Service Now


This blog explains most of the challenges faced so far in my experience

- Design a custom calendar Page, Based on custom tables and out of box tables. For eg : There is a table called 'Business Events' , users can create as many as business events with start and end date. All these business events should be appear in custom calendar page as per their scheduled time frames.By placing mouse cursor on the calendar, display specific event information by mouse hover.

- Create a JDBC data source to fetch data from one system to other system, and target should system should have live feed. That means whenever new record inserted/updated/deleted those changes should reflect in target table right away without any delay

- Write a simple background script, iterate through all the records in a table, identify what are the composite unique fields 

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/

Wednesday, June 3, 2015

How to Create a Module based on URL


This blog explains about how do you create a Module based on URL :

Scenario : For example, I want to create a new module called 'Search' , By clicking on this I want to display one of the UI page created in Service Now.


- Launch Service Now Instance

- Edit the application where you want to create new module, ( Right click on Application -> Edit Application Menu)

- Create new module

- Choose 'Link Type' as 'URL Arguments'

- Provide the URL in 'Arguments'

- Save, Refresh, click on newly created Module, you should see the page.


Hint : If you want to see the URL for any specific Incident record, Open the incident in a new tab, copy the URL and paste it into Arguments.