A data action is a piece of logic that performs a create update or delete action on one or more entities.
Exposing data with ODC
Contrary to O11 in ODC entities are always exposed read only and server actions are not public.
The rule is to expose entities read only and to use Service Actions to expose the CRUD operations.
CRUD Templates
We use the CRUD templates application from the forge to speed up and standardize the creation of Entities and Data Actions.
The template has the following elements:
Template Entity
The template entity has the following attributes:
Unique NaturalKey index
An index to ensure the uniqueness of the natural key.
TemplateEntityDbActions
The following CRUD wrappers are available:
⚠️ These actions do not contain authorization checks. Make sure these actions are not exposed to anonymous screens. You should create your own business logic that provides the proper interface and authorization checks!
⚠️ When invoked by a timer, bpt or API there is no logged in user.
Utility Actions
💡 You may want to put these actions in a library for reuse.
Adding a new entity and data actions to an application
Preparation
if you haven't done it on a previous occasion, follow these steps:
NotificationListConcat
Creating the new Entity
⚠️ WARNING: Do NOT publish the application before instructed to do so.
Add database actions for the new entity
Rename the natural key attribute
A natural key (also known as business key or domain key) is a type of unique key in a database formed of one or more attributes that exist and are used in the external world outside the database (i.e. in the business domain or domain of discourse). In the relational model of data, a natural key is a super key and is therefore a functional determinant for all attributes in a relation. From Wikipedia Natural Key
Add additional attributes