When you create an Entity, OutSystems Platform automatically creates a set of Entity Actions for you to handle entity records. These actions are available in the Data tab, right under the attributes of the entity:

You can learn detailed information about each entity action in the following articles.

The input arguments and output arguments of Entity Actions are entity records or identifiers. Therefore, any changes on the Entity definition, like adding or deleting attributes or changing the properties of the attributes, are transparent to all of the Entity Actions calls.

Note that when there is integration with external systems, transaction handling might need some extra care. Why?

Entity Actions vs SQL Statements

The Entity Actions always act upon a single record of the Entity and their SQL is very simple, i.e. no where conditions, joins or order by are available. Therefore, in some situations you have to query the database directly. For example:

In the above cases you can use an aggregate or a SQL query to query the database.

Note that there is a difference between the two approaches. Unlike aggregates or SQL queries, the Get<Entity Name> and Get<Entity Name>ForUpdate actions always return all the attributes of the entity. They don't optimize the SQL statement they execute against the database.

See Also

Execute an Entity Action | Entity Functions | Handling Transactions with External Systems