Creating a related list for Change Request

ceraulo
Mega Guru

Hello!

I created a 'Create a Normal Change' from the Requested Item. In the Change Request form, I want to add a Requested Item related list that contains the Requested Item. This is similar to the 'Problems', 'Incidents Fixed By Change; related lists.

Please help.

Thanks!

 

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

Hi ceraulo,

I'll show you how to do this, but I want to make sure you understand the process here.  When you create a change from an RITM, the RITM is stored in the parent field of the change_request.  This means 2 things 1) you can show the Parent field on the change request form to see the RITM and since it's a reference field you can click through to the RITM, and 2) there's only going to be one RITM per change request created this way, so a related list is not ideal, but this can still be done if the parent reference field is not what you're looking for.

Go to System Definition -> Relationships in the left nav.  Create a new record.  Name it whatever you want to appear as the Related List name.  Applies to table = change_request.  Queries from table = task.  Your Query with script will simply be this.

(function refineQuery(current, parent) {
	current.addQuery('sys_id', parent.parent);
})(current, parent);

Now you can configure your change request form to add your new related list.

View solution in original post

6 REPLIES 6

Hi,

yes if it is defined one then it would only show the name

if it is OOB based on field which is already present then it would show the table name there

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

A similar line is in the out of box Create Change UI Action, so all looks good there.  Since your custom related list is really just one record that is displaying the parent reference field record, you don't want either button on the related list.  The parent should be updated on the parent reference field if needed.