A120 – Historize a business object
What you will learn ?
Historize a business object


STEP 1: Open the business object to historize

STEP 2: Add the historic object to the diagram
If the historic object does not already exist, the platform will create it.
- Generated name is Historic: it is important not to change it!
- The name of the table will be the same as the main object suffix “_hist”
- The historic object has its generated fields referenced to the father: reference, version, date, login
- And all the attributes of the main object
- And a read right function to grant
It is therefore possible to insert it in the diagram:
- Right click on AppClient / Fetch related Business object
- Or right click on the diagram Insert Business object and select the historical object
Exercise:
- Insert the generated object
AppClientHistoric
in the object diagram - Save the diagram

STEP 3: Configure the historic object
You can configure the historical object like any other object:
- Add function
- Remove or add attributes, except those that deal with technical history:
row_ref_id: foreign key to the father row_idx: incremental version created_by_hist: user created_dt_hist: datetime
Exercise:
- Change the translation by
customer historic
- Verify that the tab will be visible:
In the objectAppClient
Link Tab openAppClientHistoric
check that Visible panel is set to Yes.
We could also hide by setting to no but keep the object to save historic data in table.

STEP 6: Change default sorting
Exercise:
- change the default sorting of the field
row_idx
to -2, in order that the data are ordered from newest to oldest.

STEP 7: Remove fields from historic object
Generally all the fields are not to “historize” then they should be remove from the object. Pay attention not to remove a field, you need only to delete the object field, not the field itself. If the field is removed, it will also be removed from the main object (as already seen, a field can belong to several objects, it is the case in the historic object).
Exercise:
- Remove the object field related to the customer name in
AppClientHistoric
. This means that any change of name will not be historized.
A110 – Create a specific action
How to add a specific action on a business object.