EbsRouter.callRoute
(FintechOS Studio 20.1.3 and later)
Changes the route and navigates to the specified page.
This function allows navigation when the FintechOS Portal is either in Single Page Application mode (see EbsRouter for details) or in legacy mode. On environments that operate in legacy mode, make sure you provide the
legacyUrl property in the optional config parameter.Syntax
EbsRouter.callRoute(route: EbsRouteName, newState: IRouterState, config?: IRouteConfig): void
| Property | Type | Description |
|---|---|---|
route
|
EbsRouteName | One of the location hashes available in Single Page Application mode (the route). |
newState
|
IRouterState | Identification information for the page (the state). |
config (optional) |
IRouteConfig | Optional configurations for backward compatibility, pop-up windows, and fallback routes. |
Type Aliases
One of the location hashes available in Single Page Application mode.
"#/userjourney" | "#/entityform" | "#/customform"
Contains the identification information of a page. The routeData property can take different forms, depending on the type of page (a list, a flow step, a custom form, etc.).
{
routeData: IRouteListState | IRouteFormDrivenState | IRouteCustomActionState | IRouteBusinessTransactionsState | any;
}
| Property | Type | Description |
|---|---|---|
routeData
|
IRouteListState | IRouteFormDrivenState | IRouteCustomActionState | IRouteBusinessTransactionsState | any | JSON object containing information about the page. |
Identification information specific to a list page.
{
type?: string;
mainHtmlId?: string;
entityName: string;
viewName?: string;
menuItemContext?: string;
}
| Property | Type | Description |
|---|---|---|
type (optional) |
string | "list" - Indicates that this is a view page. |
mainHtmlId (optional) |
string | ID of the container HTML element in which the list is shown. This parameter is used only internally in the platform code. |
| entityName | string | Name of the view's source entity. |
viewName (optional) |
string | Name of the view. |
MenuItemContext (optional) |
string | Menu item ID. This parameter is used only internally in the platform code. |
Identification information specific to a form or form driven flow page.
{
formId?: string;
type?: string;
mainHtmlId?: string;
entityName: string;
defaults?: string;
returnHash?: string | any;
formName?: string;
isUserJourney?: boolean;
pageNo?: number|string;
menuItemContext?: string;
}
| Property | Type | Description |
|---|---|---|
formID (optional) |
string | ID of the record (if the form or form driven flow is in edit mode). |
type (optional) |
string |
|
mainHtmlId(optional)
|
string | ID of the container HTML element in which the form is shown. By default, this is ebsContainer. |
entityName
|
string | Name of the form driven flow's source entity. |
defaults(optional)
|
string | Default values for various form fields. Use the following format: attribute1Name:value,attribute2Name:value... |
returnHash (optional) |
string | any | A return URL for when the user completes a certain flow. |
formName (optional) |
string | Name of the form or form driven flow. |
isUserJourney (optional) |
boolean | Indicates is the form driven flow is added as a user journey for an entity. |
pageNo (optional) |
number | string | Name or number of the form or form driven flow's step. NOTE Numbering starts from 0, so the first step is number 0, the second step is number 1, etc. |
menuItemContext (optional) |
string | Menu item ID. This parameter is used only internally in the platform code. |
Identification information specific to a custom form (also known as a custom flow). You can use either the form's unique identifier or name.
{
customActionId?: string;
customActionName?: string;
}
| Property | Type | Description |
|---|---|---|
customActionId (optional) |
string | Custom action unique identifier. |
customActionName (optional) |
string | Custom action name. |
Identification information specific to a record's business workflow transitions list.
{
type: "BW";
formId: string;
entityName: string;
mainHtmlId?: string;
}
| Property | Type | Description |
|---|---|---|
type
|
"BW" | Indicates that the page is a business workflow transitions list. |
formId
|
string | ID of the record. |
entityName
|
string | Name of the entity. |
mainHtmlId (optional) |
string | ID of the container HTML element in which the list is shown. By default, this is ebsContainer. |
Optional configurations for backward compatibility, pop-up windows, and fallback routes.
{
legacyUrl?: string;
popup?: boolean;
fallbackRoute?: EbsRouteName;
defaultRoute?: EbsRouteName;
}
| Property | Type | Description |
|---|---|---|
legacyUrl (optional) |
string | Legacy URL of the page. Provides backward compatibility, allowing the function to also execute on legacy (multi-page) environments. |
popup (optional) |
boolean |
|
fallbackRoute (optional) |
EbsRouteName | Relevant only for EbsRouter.continueRoute. |
defaultRoute (optional) |
EbsRouteName | Deprecated. Use fallbackRoute instead. |
Examples
In this example, we wish to edit some specific attributes of a record. For this purpose, we will open the relevant step in the entity's default editing form for that record.
- The location hash for the page is #/userjourney.
- We store the page's identification information in the myState variable.
- The name of the form's source entity is myEntity.
- The record ID is efed27b8-99ab-4b08-9691-e8e0ea139985.
- The name of the form is default.
- The form is in edit mode.
- The step number is 2 (the third step of the form).
var myState = {routeData: {
entityName: "myEntity",
formId: "efed27b8-99ab-4b08-9691-e8e0ea139985",
formName: "default",
pageNo: "2",
type: "edit"}
};
EbsRouter.callRoute('#/userjourney', myState)