Services

Various services that are available to the application in client runtime.

Index

Types

Type aliases

Types

AsyncService

Hierarchy

AsyncService

Methods

Name Signature Description
all all(...args: any [ ]): Promise <any [ ]>
defer defer <T>(): Deferred <T> Creates a deferred object which can be used to return a promise from event handlers (where applicable) and resolve reject them asynchronously.

CacheService

Hierarchy

CacheService

Methods

Name Signature Description
getData getData(cacheKey: string): any
setData setData(cacheKey: string, data: any): any

DataService

Hierarchy

DataService

Methods

Name Signature Description
findEntityData findEntityData(entityType: any, propertyName: string, propertyValue: any, includeChanges?: boolean): any
getEntityData getEntityData(entityType: any, entityId: string): any
getPageData getPageData(pageId: string, context: any, filter: any, allowedStaleness: number): Promise <PageData>

MetadataService

Hierarchy

MetadataService

Properties

Name Signature Description
version version: string
Gets the version of the platform currently running.

Methods

Name Signature Description
addControl addControl(componentName: string, controlName: string, controlType: ControlType, parentContainerName?: string, options?: ControlMetadata): any
compareVersion compareVersion(versionToCompare: string): 1 | -1 Compares the current platform version with a reference version.
configureAction configureAction(actionName: string, options: PageMetadata): any Configuring an action allows specifying or overriding certain behaviors specific to actions.
configureControl configureControl(componentName: string, controlName: string, options: ControlMetadata): any Configuring a control allows specifying or overriding certain behaviors specific to the control. Note that the available behaviors vary by control type.
configureEntity configureEntity(entityName: string, options: any): any Configuring an entity allows specifying or overriding certain behaviors specific to the entity.
configureLookup configureLookup(taskName: string, lookupControlName: string, options: LookupMetadata): any Configures a field on an action to behave as a lookup. Requires using an existing page which contains a list control.
configurePage configurePage(pageName: string, options: PageMetadata): any Configuring a Page allows specifying or overriding certain behaviors specific to the Page.
configureWorkspace configureWorkspace(options: PageMetadata): any Configuring a workspace allows specifying or overriding certain behaviors specific to the workspace.
findAction findAction(actionName: string): PageMetadata Gets a copy of the current metadata instance of a specified Action, for the purpose of inspecting the metadata (not to be used for changing the metadata).
findControl findControl(componentMetadata: any, controlName: string): ControlMetadata Gets a copy of the current metadata instance of a specified control, for the purpose of inspecting the metadata (not to be used for changing the metadata).
findPage findPage(pageName: string): PageMetadata Gets a copy of the current metadata instance of a specified page, for the purpose of inspecting the metadata (not to be used for changing the metadata).
getFilterExpression getFilterExpression(pageName: string, listControlName: string, controlName: string, operator: ExpressionOperator, value: string): DataFilter Create a DataFilter object for a list control based on the provided options.
getFormReference getFormReference(componentName: string, filterContext: DataFilter, excludeContext: boolean, filterLocalOnly?: boolean): NavigationArgs Create an INavigationArgs object for a specific page action to be used with a navigation control.
hideNavigation hideNavigation(pageNamesToHide: string [ ]): any Hides the specified page(s) from the default landing page.

PageData

Hierarchy

PageData

Methods

Name Signature Description
getControlValue getControlValue(controlName: string): any Gets the value of a control directly from the data set loaded in the page.
setControlValue setControlValue(controlName: string, value: any): any Sets the value of a control directly into the data set loaded in the page.

Type aliases

ExpressionOperator

ExpressionOperator: "Is" | "IsNot" | "Contains" | "BeginsWith" | "EndsWith" | "GreaterThan" | "LessThan" | "GreaterThanOrEqual" | "LessThanOrEqual"

Represents possible values for the expression operator used in defining filters and in other places