While with entities you manage the records at runtime, with static entities the records are managed at design time. This means that, right after you have created a static entity you are allowed to add the static data records (visible under static entity's Records folder) and use them in your application design.
Organize your static data in groups of data of the same nature. Then, for each one of those groups create a static entity reflecting the nature of the static data and add the correspondent static data records.
Although the static data records are managed at design time (and saved in the eSpace) when the application is published the OutSystems Platform automatically persists those records in the platform database.
Creating New Records
Create a new static data record by adding a record to the static entity.
How to add a record:
Simply execute one of the following operations:
After the record has been added, set the record identifier and in the Properties pane set the other attribute values.
Select the static data record in the Records folder and edit its attribute values in the Properties pane.
Select the static data record in the Records folder and simply delete it.
How to delete a record:
In the eSpace tree, under the Data layer, right-click on the record (under the Records folder of the Static Entity) and select Delete.
Once you delete a static data record that was already persisted in the Platform Database, the following occurs:
When 1-Click Publishing, the Platform attempts to delete the record from the database;
If the previous operation fails, the following occurs:
If the Is_Active field exists in the Static Entity, it is set to False, and a compilation warning issued;
If the Is_Active field does not exist in the Static Entity, an error is issued and the 1-Click Publish fails.
You may also manage the static entity's records in the Records Tab of the Entity Editor.
Using a Record
When designing your application use the record's identifier directly in your business logic, for example:
Whenever you use static data records in SQL queries you are not allowed to insert, update or delete any of those records as that is managed by the OutSystems Platform.
About Static Entities | Static Entity Records Tab | Entity Editor | About Entities | Manage Entity Records | Static Entity Properties | Entity Properties | Find and Replace Entity Usages