Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Declarative action add button to show recently removed records via Remove Declarative action

Mohana10840
Tera Contributor

Hello,

 

I have a requirement on the Policy form to create an Applicable Controls related list. This related list should automatically populate the controls that are associated with a control objective whenever a control objective is linked to a policy record. I have implemented this using a Business Rule, and this functionality is working as expected.

I have also created a “Remove” declarative related list action that allows users to select records from the Applicable Controls related list and perform a cascade delete. This functionality is also working as intended.

The new requirement is to introduce an “Add” button that displays only the controls that were previously removed, enabling users to re‑add them to the Applicable Controls related list if it's removed by mistake.

 

The Add button should display only those controls that were removed using the Remove related list action.

 

Currently, the custom "Applicable Controls" table does not have a field to track removed records. To address this, I added a new Boolean field called “Removed” (true/false). My approach was to perform a soft delete in the Remove action so that removed records could be tracked using this field, and then use this information to drive the Add button behavior.

 

I attempted the following:

  • Added a server script to the Remove action to perform a soft delete
  • Created a Business Rule to hide soft‑deleted records from the Applicable Controls related list

However, this approach is not working as expected.

 

I’m not sure how to proceed further to achieve this requirement. Could you please guide me on the correct approach to track removed controls and make them available through the Add button?

0 REPLIES 0