Tip: Stop hardcoding Action/Screen names in your auditing functions

Hi, everyone!

Every now and then we find ourselves creating some sort of debugging or logging mechanism which takes into account the name of the executing Action, or maybe the name of the Web Screen which originated the logic flow.

I needed to create some of these myself and found very tedious to hardcode each and every Action name I wanted logged. Also, refactoring becomes a problem since one can rename the Action and forget to update the hadcoded string inside the logging function.

As it turns out, it is possible to automatically identify the name of the executing Action by doing a StackTrace lookup. And a whole lot more information can be gathered this way, too, such as eSpace name, UI/Web Screen name, identifying whether it is being executed inside a Timer, etc.

So I made it into an extension (xif) and shared it here on Forge. Give it a shot if you ever find yourself stuck writing a bunch of hardcoded names for logging purposes.



Great Caio! Good solution!


Just launched another component for Mobile applications (Client Action Info)