Tasks:
- Explain the following functionalities and how to implement (basic via no-code)
- Create records
- Via CreateDialog
- Read records
- short introduction that this is working after generating B1-objects via batch generating out-of-the-box
- Update records
- Within Grids (via PanelHeaderMenu)
- Within Forms (via PanelHeaderMenu)
- Delete Records
- Within Grids (via PanelHeaderMenu)
Introduction
CRUD is the acronym for Create, Read, Update and Delete. This stands for the operations, which can be done via the Build.One Frontend for the datasets in the customer database. The specialities for these operations are explained in the following sections.
Create records via CreateDialog
To create new records you have to build a Create-Screen for the specific entity you want to add (for example CreateArticleScreen). This screen should include a form of the entity with all necessary fields and a Ribbon with a save button.
To create the correct entity, you have to call this CreateDialog from a grid of the corresponding entity, the best way to do this is via FAB-Button, for details see here
When you create the menu function to launch the CreateDialog you have to specify a special Action Option
to get the create to work. So make sure to add {'autoAdd': true, 'foreignKeyProvider': '$ []'}
to the Action Option
of the corresponding menu function
Read records with the Build.One standard tools
To work with a customer database in Build.One it is necessary to create the Build.One objects with the standard tools. For each table in the database the standard objects like Entity, DSO, Grids, Forms and also whole windows like SearchScreen, MaintenanceScreen and CreateDialog are created. These can be used directly to see the data of the corresponding table
- SearchScreen: Here’s a Grid (including all entries of the table) and a form (including all fields of one entry) of the entity included. If you choose one entry in the grid, this will be displayed in the form. This screen can be used as an overview screen
- MaintenanceScreen: Here’s a Ribbon and a tabbar included. Also a form of the entity including all fields. This screen can be used as a detail screen of an entry
- CreateDialog: Here’s a toolbar and a form of the entity included. This screen can be used to add new entries
Update records via Grids
In Grids it’s possible to activate the inline-editing (also possible only for some entries). Than you can change the values directly in the grid and save these with a save button in the panel header menu. To enable this, please see Grid / Table
Update records via Forms
It’s also possible to update the data via a form which is for example used in a MaintenanceScreen. In the Form you can define, which fields are allowed to change. To save the changed records you have to add a save button to the corresponding screen, for example in the Ribbon () of the MaintenanceScreen.
Delete records via Grid
To delete an entry select the specific entry and delete it with the trash-icon in the panelMenu. If there is no such icon displayed in the panelMenu, please see Grid / Table how to add this.
With this action the selected entry will be deleted