IApplication
Allows access to application-level UI elements, behaviors and events
See ApplicationEvents for supported events
Extends
Methods
_dispose()?
optional _dispose(): void;
Returns
void
Inherited from
_toJSON()
_toJSON(): RemotingScriptingObject;
Returns
Inherited from
closeModal()
closeModal(): Promise<void>;
close a modal
Returns
Promise<void>
getApplicationContext()
getApplicationContext(): Promise<ApplicationContext>;
Get the context of the application
Returns
Promise<ApplicationContext>
application context
getCapabilities()
getCapabilities(): Promise<Capabilities>;
Get the capabilities of the application
Returns
Promise<Capabilities>
capabilities as key-value pairs
getCompanySettings()
getCompanySettings(options: CompanySettingsQueryOptions): Promise<Record<string, unknown> | null>;
get company settings for a particular category
Parameters
options
options to query company settings
Returns
Promise<Record<string, unknown> | null>
company settings as key value pairs. Null if category is not found
getDescriptor()
getDescriptor(): Promise<DescriptorInfo>;
Gets descriptor for the Application
Returns
Promise<DescriptorInfo>
application descriptor
getInfo()
getInfo(): Promise<AppInfo>;
Get additional information about the application
Returns
Promise<AppInfo>
application info
getPersonaAccess()
getPersonaAccess(): Promise<Record<string, unknown>>;
Returns
Promise<Record<string, unknown>>
persona access information as key value pairs
Deprecated
use getUserAccessRights instead get persona Access information for the current user
getPoliciesDetails()
getPoliciesDetails(): Promise<Record<string, string>>;
get policy details for the current user
Returns
Promise<Record<string, string>>
policy details as key value pairs
getUserAccessRights()
getUserAccessRights(): Promise<UserAccessRights>;
Get access rights for the current user
Returns
Promise<UserAccessRights>
user access rights (effective rights)
Throws
if operation fails
keepSessionAlive()
keepSessionAlive(): Promise<void>;
renew the user session
Returns
Promise<void>
navigate()
navigate(options: NavigationOptions): Promise<void>;
navigate to a location in the application
Parameters
options
navigation options
Returns
Promise<void>
open()
open(options: OpenOptions): Promise<void>;
open a page / document / module
Parameters
options
open options
Returns
Promise<void>
Example
to open a module in inline mode
await application.open({
target: 'urn:encompass:loanapp',
type: OpenType.MODULE,
openMode: OpenMode.IFRAME,
parameters: {
id: '1234567890'
}
});
openModal()
openModal(options: ModalOptions): Promise<string>;
open a modal
Parameters
options
modal properties
Returns
Promise<string>
action selected by the user
Example
const result = await application.openModal({
type: ModalType.WARNING,
data: {
title: 'Warning',
body: 'This operation is final and cannot be reversed. Do you want to proceed?',
actions: ['Ok', 'Cancel']
}
});
if (result === 'Ok') {
// user clicked Ok
} else {
// user clicked Cancel
}
performAction()
performAction(action: string, options: Record<string, string>): Promise<void>;
Perform an action
Parameters
action
string
action name
options
Record<string, string>
additional options
Returns
Promise<void>
print()
print(options: PrintOptions): Promise<void>;
Prints given document
Parameters
options
Print options
Returns
Promise<void>
showToast()
showToast(options: ToastOptions): Promise<void>;
show toast message
Parameters
options
toast options
Returns
Promise<void>
Example
await application.showToast({
title: 'Greeting',
content: 'Hello World',
type: ToastType.INFO
});
supportsAction()
supportsAction(name: string): Promise<boolean>;
get supportability of an action
Parameters
name
string
action name
Returns
Promise<boolean>
true if the action is supported
Properties
ActionCompleted
readonly ActionCompleted: IEvent;
notifies action completion
Use ApplicationActionCompletedListener to handle this event
id
readonly id: string;
Inherited from
Login
readonly Login: IEvent;
notifies user login
Use ApplicationLoginListener to handle this event
ModuleOpen
readonly ModuleOpen: IEvent;
event fired when a module to be opened
Use ModuleOpenListener to handle this event
NavigationStart
readonly NavigationStart: IEvent;
event fired when navigation starts
Use ApplicationNavigationStartListener to handle this event
objectType
readonly objectType: string;