Relating Requested Items To Change Requests

Alistair_Pleas1
Tera Contributor

Is there a way to relate one requested item to multiple change requests?

Currently I can relate one requested item to a change, however, when I relate the same requested item to another change it removes the link to the old change and only shows the related item on the new change.

Any help on this would be greatly appreciated. 

1 ACCEPTED SOLUTION

Ok, and sorry for the trial and error but - this finally worked for me: 

Create ONLY the M2M table as pictured below: 

find_real_file.png

Go straight to Change form, configure > related lists, and add it

 

find_real_file.png

 

and boom. 

find_real_file.png

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

View solution in original post

8 REPLIES 8

Michael Jones -
Giga Sage

You can create a relation between the two tables, basically creating your own Related List. 

The instructions would be here: https://docs.servicenow.com/bundle/newyork-platform-user-interface/page/administer/form-administrati...

If this was helpful or correct, please be kind and remember to click appropriately! Michael Jones - Proud member of the CloudPires team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

Michael Jones -
Giga Sage

Ok, little more to it, sorry.

First you need to create a M2M table. Mind looks like this:

find_real_file.png

 

Then create the relationship:

Add a "Query with" like this: current.addQuery('u_change_request', parent.getValue('sys_id'));

find_real_file.png

 

Then, go to your change record, Configure > Related Lists and add your new list!

find_real_file.png

 

If this was helpful or correct, please be kind and remember to click appropriately! Michael Jones - Proud member of the CloudPires team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

Alistair_Pleas1
Tera Contributor

Hi Michael,

 

Thanks for the quick response this has worked perfectly. One thing that I can't seem to get working is changing from a new button to an edit button. I have gone into the list control and selected the Enable Edit UI action however this doesn't seem to do anything. Omit edit button is also unchecked! 

Any ideas how I can show the edit button rather than the new button on the related list?   

Thanks,

Interesting. It doesn't seem to be well documented but...

It looks like you need to add the related list to BOTH tables in order to make the Edit button show up! I added my list to both change_request and sc_req_item and suddenly the edit button appeared. Seems kind of strange to me...but...give it a try. 

If this was helpful or correct, please be kind and remember to click appropriately! Michael Jones - Proud member of the CloudPires team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!