Prerequisites
The object must have displayed value.

1. Run script in dev environment to create [glb_RegisterSection] stored procedure
glb_RegisterSection stored procedure
CREATE OR ALTER PROC [glb_RegisterSection] (
@EntityName NVARCHAR(100),
@SectionCaption NVARCHAR(100),
@SectionPageName NVARCHAR(100),
@EditPageName NVARCHAR(100)
)
AS BEGIN TRANSACTION;
SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SET XACT_ABORT ON;
BEGIN TRY
IF @EntityName = ''
THROW 50001, 'Parameter @EntityName is empty', 1;
IF @SectionCaption = ''
THROW 50001, 'Parameter @SectionCaption is empty', 1;
DECLARE @SysModuleId UNIQUEIDENTIFIER = NEWID();
DECLARE @SysModuleEditId UNIQUEIDENTIFIER = NEWID();
DECLARE @SysModuleEntityId UNIQUEIDENTIFIER = NEWID();
DECLARE @SysEntitySchemaUId UNIQUEIDENTIFIER;
DECLARE @SectionSchemaUId UNIQUEIDENTIFIER;
DECLARE @CardSchemaUId UNIQUEIDENTIFIER;
DECLARE @ActionKindName NVARCHAR(250);
DECLARE @PageCaption NVARCHAR(250);
SELECT TOP 1
@SysEntitySchemaUId = UId,
@ActionKindName = Caption
FROM SysSchema
WHERE Name = @EntityName
AND ExtendParent = 0;
SELECT TOP 1
@SectionSchemaUId = UId
FROM SysSchema
WHERE Name = @SectionPageName
AND ExtendParent = 0;
SELECT TOP 1
@CardSchemaUId = UId,
@PageCaption = Caption
FROM SysSchema
WHERE Name = @EditPageName
AND ExtendParent = 0;
IF @SysEntitySchemaUId IS NULL
THROW 50002, 'Entity not found. Check @EntityName input parameter.', 1;
IF @SectionSchemaUId IS NULL
THROW 50002, 'Section page not found. Check @SectionPageName input parameter.', 1;
IF @CardSchemaUId IS NULL
THROW 50002, 'Edit page not found. Check @EditPageName input parameter.', 1;
INSERT INTO SysModuleEntity (
Id,
SysEntitySchemaUId)
VALUES (
@SysModuleEntityId,
@SysEntitySchemaUId
);
INSERT INTO SysModuleEdit (
Id,
SysModuleEntityId,
CardSchemaUId,
UseModuleDetails,
ActionKindCaption,
ActionKindName,
PageCaption)
VALUES (
@SysModuleEditId,
@SysModuleEntityId,
@CardSchemaUId,
1,
'New',
@ActionKindName,
@PageCaption
);
INSERT INTO SysModule (
Id,
Caption,
Code,
SectionSchemaUId,
SysModuleEntityId,
CardSchemaUId,
FolderModeId,
SectionModuleSchemaUId,
CardModuleUId,
Image32Id)
VALUES (
@SysModuleId,
@SectionCaption,
@EntityName,
@SectionSchemaUId,
@SysModuleEntityId,
@CardSchemaUId,
'B659D704-3955-E011-981F-00155D043204',
'DF58589E-26A6-44D1-B8D4-EDF1734D02B4',
'4E1670DC-10DB-4217-929A-669F906E5D75',
'026742D9-390C-4778-BC46-9FA85C42677A'
);
SELECT
@SysModuleId AS SysModule,
@SysModuleEntityId AS SysModuleEntity,
@SysModuleEditId AS SysModuleEdit;
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
SELECT ERROR_NUMBER() AS ErrorNumber,
ERROR_MESSAGE() AS ErrorMessage;
IF @@TRANCOUNT > 0
ROLLBACK TRANSACTION;
END CATCH;
IF @@TRANCOUNT > 0
ROLLBACK TRANSACTION;
2. Create section and edit pages (if not exist)

Create Section page (parent BaseSectionV2)
define("UsrEntitySectionV2", [], function() {
return {
entitySchemaName: "UsrEntity",
messages: {},
mixins: {},
attributes: {},
methods: {},
diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
};
});
Create Edit page (parent BaseModulePageV2)
define("UsrEntityPageV2", [], function() {
return {
entitySchemaName: "UsrEntity",
messages: {},
mixins: {},
attributes: {},
methods: {},
details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
};
});
3. Execute a stored procedure in dev environment to register section.
Stored procedure [glb_RegisterSection] takes such arguments: EntityName, SectionCaption, SectionPageName, EditPageName.
Example
exec dbo.[glb_RegisterSection] 'UsrEntity', 'My entities', 'UsrEntitySectionV2', 'UsrEntityPageV2'

4. Bind new data to a package with a filter by IDs from output for the following system tables:
- SysModuleEntity
- SysModule
- SysModuleEdit
Standard list of objects
EntityName, EntityName + "Folder", EntityName + "File", EntityName + "InFolder", EntityName + "Tag", EntityName + "InTag"