How can I the edit button to custom related list

Alon Grod
Tera Expert

Hi,

I created a new custom related list called 'Assignment Histroy'. When I try to add the 'Edit' button using the List control, the option is Read only. How can I add the 'Edit' button to the related list?

Screenshot 2023-08-16 at 17.26.25.png

Screenshot 2023-08-16 at 17.26.45.png

5 REPLIES 5

Aman Kumar S
Kilo Patron

Hi @Alon Grod 

 

Symptoms

On the form of table A, there is a related list missing the 'Edit' button. This related list is a many-to-many relationship between table A and table B. 

Release

All

Cause

Although the name of the 'many-to-many relationship table' might indicate it is such type of table, this may not be the case.  Opening this table in a List View from the related list ( cmd + right-click > 'Open new window') and examining the URL might suggest it's a 'many-to-many relationship' table because of the table's name format:

 

https://[instance-name].service-now.com/u_m2m_ATable_BTable_list.do?sysparm_query=problem%3D325790a2db8d3b006907f13bbf96196c%5E

 

Specifically, the u_m2m_ATable_BTable part.  However, this table could have been given the u_m2m_ATable_BTable name from a user trying to build a many-to-many relationship table but using the wrong method to do so.  Although the custom table might have been given the right reference fields to build a many-to-many relationship, additional field properties in the reference fields need to be set up that enables links to the parent tables (Tables A or Table B).  The user is better served using the OOB method for building many-to-many relationship tables instead of going to System Definition > Tables.

 

Resolution

An easier way to build a many-to-many relationship table is to use provided OOB method that is specifically designed for these purposes

  1. Navigate to sys_m2m.list
  2. Hit the 'New' button
  3. Enter Table A in "From table" and Table B in "To table"

When you add this newly created table to the related list of either Table A or Table B, you will see the "New" and "Edit" button on either related list.

 

Additional Information

https://docs.servicenow.com/csh?topicname=t_CreateAManyToManyRelationship.html&version=latest

Best Regards
Aman Kumar