NebulaLogger icon indicating copy to clipboard operation
NebulaLogger copied to clipboard

Filter for records in Batch Purger

Open erikvlm opened this issue 2 months ago • 2 comments

I'd like to be able to filter our particular records for the batch purger. There are certain records that we don't want to ever delete. Is this a feature that is available today, and if not, is it wise to modify the LogBatchPurger class to just exclude some records from the query?

erikvlm avatar Nov 22 '25 10:11 erikvlm

Hi @erikvlm - you can control that today by setting the value of Log__c.LogRetentionDate__c to null - the batch purger job ignores any records with a null. You could use the LoggerSettings__c object to control this via config, or add your own automation, etc. to further control the value of LogRetentionDate__c. Regardless of how you set/update the field value, as long as it ends up null, it'll be kept indefinitely.

jongpie avatar Dec 02 '25 21:12 jongpie

Thanks @jongpie - how is Retention Date controlled through flows though. It seems like I can't control that fields in a flow context, only through apex

erik-malmberg-monfido avatar Dec 05 '25 12:12 erik-malmberg-monfido