Back to the Basics with Relationships

General Add comments
by:

ServiceNow is one of the most powerful platforms available in the IT Service Management market. As a cloud-based company they are still inventive with their automation. A few times per year ServiceNow introduce new releases with new or enhanced functionality. Each time I am very curious what they will offer in new releases. But at the same time it might confuse administrators since they will have various options to create functionality in the tool.

If two tables are related to each other, only one can appear as a related list on the other. If you want to make a distinction for example between Business Tasks and Technical Tasks and both must be available as a separated related list, don’t create a new reference but instead create a new relationship! You will find the relationship module in the application “System Definition”.

In my example I am creating a separated related list for Business Tasks and Technical Task. Within the relationship record you will have the possibility to query via script. You have to define for which table the relationship applies via the “Applies to table”.

current.addQuery(‘parent’, parent.sys_id) //Get parent sys_id
current.addQuery(‘task_type’, ‘business’); // Get Task type Business.
image001

Submit to record and add the relationships on the table via “Personalizing related list” functionality.
image003
Investigate and consider your options before implementing and keep in mind that ServiceNow offers a lot of ways to implement requirements. Good Luck and Happy Coding 🙂

Regards, .img[at].img

Leave a Reply