Remove/Unlink Records from related list

BKash
Tera Contributor

Hi, I want the records from related lists [Downstream risks and Downstream controls] on Entity form[sn_grc_profile] for a particular entity class to be removed without getting them deleted. How can I achieve this without creating buttons on related list?

 

1 ACCEPTED SOLUTION

pramodhm112
Tera Expert

Hi @BKash

 

To remove the records from the related lists [Downstream Risks] and [Downstream Controls] on the Entity [sn_grc_profile] form for a specific entity class, without actually deleting the records or adding buttons to the related lists, you can achieve this by applying a dynamic filter or modifying the relationship condition.

 

Here are a couple of clean ways to approach it:

 

1. Use a UI Policy or Client Script (onLoad) to dynamically filter the related list display: You can hide or restrict the records shown in the related list by adding a filter condition based on the entity class. This doesn’t delete data & it simply limits what is visible for that context.

 

2. Modify the relationship query in the related list configuration (via Dictionary Override or Related List Condition):

You can add conditions such as entity_class != <your_target_class> to prevent records of that class from appearing in the list.

 

This way, the records are not deleted; they’re just hidden from the form based on the specified logic.

 

Thanks,
Pramodh

View solution in original post

3 REPLIES 3

pramodhm112
Tera Expert

Hi @BKash

 

To remove the records from the related lists [Downstream Risks] and [Downstream Controls] on the Entity [sn_grc_profile] form for a specific entity class, without actually deleting the records or adding buttons to the related lists, you can achieve this by applying a dynamic filter or modifying the relationship condition.

 

Here are a couple of clean ways to approach it:

 

1. Use a UI Policy or Client Script (onLoad) to dynamically filter the related list display: You can hide or restrict the records shown in the related list by adding a filter condition based on the entity class. This doesn’t delete data & it simply limits what is visible for that context.

 

2. Modify the relationship query in the related list configuration (via Dictionary Override or Related List Condition):

You can add conditions such as entity_class != <your_target_class> to prevent records of that class from appearing in the list.

 

This way, the records are not deleted; they’re just hidden from the form based on the specified logic.

 

Thanks,
Pramodh

Ankur Bawiskar
Tera Patron
Tera Patron

@BKash 

share some screenshots for your requirement.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

For example, we have this entity class 'Application', and there are three entities under this. So, for these three entities I want to remove the downstream controls and downstream risks records.
BKash_0-1746191282025.png

BKash_1-1746191334558.png