How to find and delete the Inactive records for a particular class from a Pega application?

When I was checking for something in the Report Definition rules, I got a rule: pxLoadRelevantRecordsForRecord. This report is used to pull all the active records from the system based on the context class. With this report, we can list out all the Inactive rules for our application specific class and cross check them before deletion from the system. We can build a small utility sat for example: RemoveInactiveRecords and from this activity we can call this final RD rule and pass the necessary parameters to pull the inactive list of rules instances. Once we get the list on the clipboard page, we can build the clean-up logic in the same activity or another activity to do that.

The highlighted filter drives whether we need active or inactive records. Similarly, we can pass the parameter to the column: pxContextClass (Eg:Data-) from the utility by using “Call Rule-Obj-Report-Definition.pxRetrieveReportData”. See below for more details on how to call and pass the parameters to this RD rule from the utility.
 Utility or activity to call the above RD with necessary params














Call the clean-up logic to delete the inactive rules from the system by using below steps from the same utility.




O/P of the RD rule after running it.











Note: There is no need to follow the above directions mentioned in the utility but the main point is the functionality of this RD in this context to clean-up the rules over a period of time JJ


Popular posts from this blog

Connecting Claude to Pega Infinity 25.1.3 via MCP — Step-by-Step

Build Pega Applications with GitHub Copilot CLI, Pega Infinity AI Plugin & MCP — Branch-Based Agentic Authoring

itextpdf API to generate PDF doc from an image file using Pega PE