Samo-create-entity-app-module
Level: Intermediate
Keywords: application modules, create entity
The result: integration of create-entity-app-module to your project
This site shows overview of samo-create-entity-app-module. This module allows you to define how new entities will be created. By following configurations you can change the default behavior of this module, which is usually automatically present in the SAMO Application.
This app module must be defined in applicationModules property on the dashboard page.
Simple samo-create-entity-app-module configuration
If you want to create entity without any related entities at the same time, you can use very simple configuration of this module.
"applicationModules": {
"create-entity": {
"type": "component:entity-modules/modules/samo-create-entity-app-module",
"title": "Create fault report",
"icon": "icons:create",
"entitiesGroup": "faultReports",
"afterCreate": {
"closeEntityDetail": true,
"updateAppState": true
}
}
}
More advanced samo-create-entity-app-module configuration
If you want to create an entity with related entities at the same time, you have to use more complex configuration of this module. You need to define actionDetail and bussines action(TO DO LINK) to process inputs. The example below shows insertEntites property use.
"applicationModules": {
"create-entity": {
"type": "component:entity-modules/modules/samo-create-entity-app-module",
"icon": "icons:create",
"entitiesGroup": "faultReports",
"insertEntities": [
{
"entity": "ft_faultReports",
"title" : "Create fault report",
"type": "businessAction",
"detailContext": "newReportFault",
"actionId": "createNewFaultReport",
"confirmButtonTitle": "CREATE",
"noResultDetail" : true,
"allowContinuousAction": false,
"navigateAfterFinish": {
"part": "ap_faults",
"page": "pg_faultReports",
"arguments": {
"detail": "{get:#fullId}"
}
}
}
],
}
}
All configuration options are available in Dynamic-App Module Catalog.
It is possible to define this module for one entity multiple times but with different contexts.