External portal / External portal in an app

External portal in an app

External users can interact with the portal from a browser, ELMA for desktop (version 2.0.6 and higher), and mobile devices (version 1.3.0 and higher).

To enable external users to work with the portal from apps, the Administrator needs to place a special link on the portal page for access from an app.

To do this, in the interface designer of the portal page, go to the Scripts tab and add the Namespace.portal.generateELMAAppURL() method. Then place the generated link on the portal page. For example, using a property of the Link type, into which the value generated by the method will be passed. We will consider a detailed example of placing the link on the page later.

You can also convert the link into a QR code using an external service and also place the image with the code on the page, for example, using the Text widget.

To access the portal in the app, the user needs to follow the link placed on the page. This will open the ELMA365 application with the page of authentication to the external portal.

To access the portal via a QR code, the user needs to open the page of the portal where the code is placed and the ELMA365 application for mobile devices. Then on the authentication page in the app, they need to click Scan QR code. After scanning the image, the sign-in page to the external portal will open.

Example

Let’s consider an example of adding an app sign-in link to the portal page. We will make it so that the link is generated and displayed on the portal page after the button is clicked. To do this:

  1. Go to the interface designer of the external portal page.
  2. On the Settings tab, in the Available items section, enable the Allow using all items option to enable access to global constants.
  3. On the Context tab, create a property of Link type.

portal-app-1

  1. Open the Template tab and place the created property on the modeling canvas.
  2. In the opened property settings window, set the Read only option to Yes. This is necessary to make the link clickable. Save the settings.
  3. Bring up the Button widget in the field.
  4. In the opened settings window, set the widget parameters:
  • Title/Tooltip*. Enter a name for the button, for example, Get link.
  • Executed script. Add a script that will generate a link and output it in the Link field to work in the app. To do this, click Create and then click Open.

portal-app-2

  1. On the opened Scripts tab, write the following code:

async function getELMAAppURL(): Promise<void> {
  const ELMAAppURL = await Namespace.portal.generateELMAAppUrl();
  // Assigning the generated link to a variable of the Link type
  Context.data.link = ELMAAppURL;
}

  1. Save and publish the changes.

After that, a button will be displayed on the external portal page where users can get the link to work in the external portal from the app.

Found a typo? Highlight the text, press ctrl + enter and notify us