how to get identification of current screen of api at runtime

Is there a way to get a unique identification of the current screen or api at runtime.

I need to identify these objects to be able to use an existing centralized way of authorization and logging. In this central system all applications of the company, not only the outsystems applications, are managed.

At this moment I have implemented a local variable in these objects.
The default value of the variable is the Id of the object in the metadata-tables.
This value is used in the administration of the central system and in the call to the central system to identify the object. In this way we can authorize individual api's and screens from the centralized systems.

Because this is a manual action there is a risk that the value of an object is wrong.
It would be nice if I could use a build-in action that returns a unique identifier of the object. It would be very nice if this identification is the same Id the object has in the metadata-tables of outsytems. An action like GetCurrentObjectId() is what I expected to exist.

Hi Eric,

I'm a bit at a loss to see why you want to do this, or whether this is actually the best Idea. It seems to me that if you want to do some central authorization outside the Platform, you should synchronize the priviliges with the external authorization system, not jump through some hoops by creating some convoluted authorization scheme that bypasses the OutSystems way of doing things.

Eric -

I'm guessing you need to do something like log all page requests to a central system for security auditing, privacy, regulatory, etc. reasons and perhaps check with the same for some centralized authorization. I've been asked to implement the same in the past, and there's no good way that I have found to get a truly unique identifier. You can use GetPageName from HTTPRequestHandler, but if the page's name ever changes, that will need to get updated in your central system as well.

J.Ja