Building the "Order Management" Training App : Creating an inherited object
Prerequisite : You have a basic understanding of the Simplicité platform, and the steps in Enhancing are completed
What is inheritance ?
Inheritance is a mechanism that allows a Business Object to inherit properties and methods from another Business Object. In Simplicité, inheritance can be used to customize a System Object, display filtered lists... Learn more
Creating an inheritor of TrnProduct
Let's use the inheritance pattern to access a list of "cheap" Products (price ranging from 10 to 50€).
To do so, follow the steps below :
- In the Business objects > Business objects menu, click Creation assistant
For a detailed guide, see Add an object
- Create a Business object :
- Code : TrnProductCheap
- Table : trn_product (the table is the same as the parent object's)
- Click Next
- Create a Translation for the object :
- English : Cheap products|Cheap product
- Grant a Read only function to the TRN_SUPERADMIN Group
- Follow all the steps of the creation process
- In the Extend of Logical name field of TrnProductCheap, select TrnProduct
- Click More on the Objects form
- Set the following value in the Filter field :
trn_prd_price < 50
- Click Save
Test the newly created inheritor with usertest
- Clear the platform's cache and log in using usertest
For a detailed step-by-step, see : Testing the User
Success
The Cheap product
menu entry is visible and the list of Products with a price lower than 50 is displayed when clicked