
To programmatically navigate to a page from a Creatio Freedom UI Page you’ll use the HandlerChainService. This new module is the new DevKit SDK equivalent to using openCardInChain in classic pages, as I showed in a previous article.
To use this devkit, you’ll need to add “@creatio-devkit/common” to the modules list of your page. This will look like this (note the “@creatio-devkit/common” in the square brackets and the sdk without quotes in the parenthesis):
define("UsrMyCustomEntity_FormPage", /**SCHEMA_DEPS*/["@creatio-devkit/common"] /**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/(sdk)/**SCHEMA_ARGS*/ { return { // ... the rest of the page here }; });
Now, with that module available, you can access things in the SDK such as the HandlerChainService module. This article will focus on opening a page given its schema name. This is useful for opening a page that is not bound to a particular record. For example, a dashboard/home page or a section list page. In a future article I’ll outline how to open a page in add or edit mode.
Given the schema name for the orders section, which is named OrderSectionV2, we would open it from a Freedom UI page by first creating an instance of the HandlerChainService, then issue a crt.openPageRequest and provide the schema name for the Orders section (or whatever static page we want to navigate to).
const handlerChain = sdk.HandlerChainService.instance; // navigate to the Orders section await handlerChain.process({ type: "crt.OpenPageRequest", schemaName: "OrderSectionV2", $context: request.$context });
In the code above, we’ve provided the schema name to open. The result will be that the user will navigate to the Orders section.
Subscribe To Our Newsletter
Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!
You have Successfully Subscribed!