Logging message to error log for first iteration of the business rule
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:
