$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
) => Promise<Metadata>
• Details
Expects a script alias (unique identifier of the metadata object)
and optional MetadataObjectParams (default: null
).
Returns a Promise that resolves with a Metadata object.
• Example
// Retrieve metadata for a specific object (by script alias "stbUsers")
// Including its attributes in the response
E8App.$metadata.get(
'stbUsers', {
include: [
E8App.$metadata.T_ATTRIBUTE, // Load attributes for this object
]
}).then(res => {
console.log(res); // Single Metadata object with attributes
});
getAll()
• Type
(
type: string,
params?: MetadataParams
) => Promise<Metadata[]>
• Details
Expects one of the metadata T_TYPE values (defined in plugin properties) and optional MetadataParams.
Returns a Promise that resolves with an array of Metadata objects.
• Example
// Retrieve all metadata objects of type "system table"
E8App.$metadata.getAll(E8App.$metadata.T_SYSTEM_TABLE)
.then((res) => {
console.log(res); // Array of Metadata objects
});