$metadata
Updated on Aug 29, 2025 4 minutes to readThe Metadata Plugin provides methods to retrieve and manage application metadata, including forms, reports, roles, modules, enumerations, and access permissions.
Properties
Property | Description |
---|---|
P_DELETE | Permission type: Delete. |
P_EXPORT | Permission type: Export. |
P_INSERT | Permission type: Insert. |
P_UPDATE | Permission type: Update. |
P_VIEW | Permission type: View. |
P_VIEW_AUDIT_LOG | Permission type: View audit log. |
P_VIEW_REFERENCE_TO_OBJECT | Permission type: View reference to object. |
T_ACTION | Metadata type: Action. |
T_ATTRIBUTE | Metadata type: Attribute. |
T_DATA_PROVIDER | Metadata type: Data provider. |
T_EMBEDDED_FORM | Metadata type: Embedded form. |
T_ENUMERATION | Metadata type: Enumeration. |
T_ENUMERATION_VALUE | Metadata type: Enumeration value. |
T_IMAGE | Metadata type: Image. |
T_LIST | Metadata type: List. |
T_LIST_FORM | Metadata type: List form. |
T_MODULE | Metadata type: Module. |
T_OBJECT_FORM | Metadata type: Object form. |
T_PAGE | Metadata type: Page. |
T_PRINT_FORM | Metadata type: Print form. |
T_REPORT | Metadata type: Report. |
T_ROLE | Metadata type: Role. |
T_SYSTEM_TABLE | Metadata type: System table. |
T_TABULAR_SECTION | Metadata type: Tabular section. |
T_TRIGGER | Metadata type: Trigger. |
T_WIDGET | Metadata type: Widget. |
Methods
Method | Description |
---|---|
get | Retrieves metadata by script alias. |
getAll | Retrieves all metadata objects of a given type. |
Methods Details
get()
• Type
(
scriptAlias: E8ScriptAlias,
params?: MetadataObjectParams
) => Metadata
• Details
Expects a script alias (unique identifier of the metadata object)
and optional MetadataObjectParams (default: null
).
Returns a Metadata object.
• Example
// Retrieve metadata for a specific object by script alias "stbUsers"
const metadata = E8App.$metadata.get('stbUsers', {
include: [
E8App.$metadata.T_ATTRIBUTE
]
});
// Use the metadata object in server-side logic
if (metadata.canView) {
// Process or return data
}
getAll()
• Type
(type: string) => Metadata[]
• Details
Expects one of the metadata T_TYPE values (defined in plugin properties).
Returns an array of Metadata objects synchronously.
• Example
// Retrieve all metadata objects of type "system table"
const allTables = E8App.$metadata.getAll(E8App.$metadata.T_SYSTEM_TABLE);
// Iterate or use the array of metadata objects in server logic
allTables.forEach(table => {
if (table.canInsert) {
// Perform insert-related server-side operations
}
});