I am launching a business rule through a Data Management job for all the base entities of certain rollup, i.e, TopEntity.base. As expected, the code loops through all the base entities and executes the code. I want to log the POV passed in for troubleshooting purposes. When I log the message, it logs it for each iteration of the code. Is there a way to only log the message for the first iteration of the code to avoid logging multiple entries to the log? As a workaround, I have hard-coded a specific entity, but if I can avoid hard-coding that would be ideal. Below is the code snippet:
If this is for troubleshooting, create a parameter such as pm_iter. Set it to 0. Then in your br set it to 1 near the end of the code. Put logic around your logging to check if pm_iter = 0. This way it will only log the first time.