Getting Entity Name From Object

Getting Entity Name From Object

  

I created an audit trail server action and I would like to improve on it.

Currently, my application is passing the entity name using Text which is not the best way due to potential typo errors. 

I followed strictly on this old post for implementation but I just couldn't find the second component that was mentioned in the Forge: https://www.outsystems.com/forums/discussion/19991/get-entity-name/

Is there any other ways to get the entity name from the already converted object? 

Hi Jianlong,

You can get the Entity name in an Extension, but if you don't know how .NET reflection works, and/or don't know how to create an Extension, I wouldn't go that route.

If you pass the name as Text, you can at least verify it against the System module's Entity Entity (yes, that's an Entity called Entity :)).

Why not use a Static Entity instead?

Then, instead of the name, you'll only need to pass the static entity's Identifier.


Jianlong Lin wrote:

I created an audit trail server action and I would like to improve on it.

Currently, my application is passing the entity name using Text which is not the best way due to potential typo errors. 

I followed strictly on this old post for implementation but I just couldn't find the second component that was mentioned in the Forge: https://www.outsystems.com/forums/discussion/19991/get-entity-name/

Is there any other ways to get the entity name from the already converted object?