Callui

Callui is used to execute a pre-determined action on the web client.

This function is only usable in Classic pages related code and is deprecated for code running in version 7 mode.

Syntax

Callui RETURN = "" With ACTION, PARAM_LIST

Where:

Examples

# Example 1: open a browser tab and navigate to Sage official web siteLocal Char RETOUR(250)Callui RETVALUE="" With "UIAction=" + chr$(1) + "OpenFile",& "UILocalDir=" + chr$(1) + "HTTP",& "UILocalFile=" + chr$(1) + "www.sage.com"# Example 2: open a browser tab and navigate to secured Google web siteCallui RETVALUE="" With "UIAction=" + chr$(1) + "OpenFile",& "UILocalDir=" + chr$(1) + "HTTPS",& "UILocalFile=" + chr$(1) + "www.google.com"# Example 3: open a browser tab and navigate to an url corresponding to a # sub-file of the current folder under the mount point address of the # application serverCallui RETVALUE="" With "UIAction=" + chr$(1) + "OpenFile",& "UILocalDir=" + chr$(1) + "HTTPS",& "UILocalFile=" + chr$(1) + "GEN/SYR/FR-FR/FENJ/",& "UILocalFile=" + chr$(2) + "OAMK.json",& "UIAdxPubSubFile=" + chr$(1) + "3"# Example 4: open a browser tab and navigate to an url corresponding to a # sub-file of the “X3_ROOT” folder under the mount point address of the # application serverCallui RETVALUE="" With "UIAction=" + chr$(1) + "OpenFile",& "UILocalDir=" + chr$(1) + "HTTPS",& "UILocalFile=" + chr$(1) + "GEN\FRA\LIB\localize.json",& "UIAdxPubSubFile=" + chr$(1) + "2"

Description

Callui is used to launch one of the following actions on the web client:

A single action can be specified at a time.

On completion, a code specifies that the action has been correctly carried out or not.

UIAction parameter

This parameter is used to identify the action to be launched on the client.

The available actions are as follows:

ActionDescription
OpenFileOpen a browser tab on the client browser and prompt a web URL

UIParam parameters

They are used to specify the parameters of an action.

The list of parameters is the following:

ParametersMandatoryDescription
UILocalFileYesFull or relative URL, depending if UIAdxPubSubFile parameter is set or not.
For a full URL, value must not contain the prefix "http://" or "https://".
Parameter value cannot exceed 240 characters.
UILocalDirYesContains the protocol name: HTTP or HTTPS.
Regardless the value for this parameter (i.e. HTTP or HTTPS), if parameter UIAdxPubSubFile is set, the full URL is automatically computed, based on the current session protocol.
UIAdxPubSubFileNoIf this parameter is set, UILocalfile parameter must contain a relative URL based on :
  • subdirectory “X3_ROOT" under the mount point address of the application server if UIAdxPubSubFile =2
  • subdirectory corresponding to the current folder name under the mount point address of the application server if UIAdxPubSubFile =3
UIWindowFeaturesNoIf this parameter is set, a standalone browser is opended instead of a new browser tab. Width and height of the browser window are defined in pixels : "UIWindowFeatures=" + chr$(1) + "width=300,height=300"
UIWindowTimeOutNoIf UIWindowFeatures is set, this parameter force the auto close of the standalone browser after a specified number of milliseconds has elapsed : "UIWindowTimeOut=" + chr$(1) + "10000".

Return

This parameter is used to identify the variable that will contain the information on the return of the instruction.
The instruction returns the name of the action, followed by the status code.

The status code takes one of the following values:
* 1 : the action unfolded as planned

* 0 : an error occurred during the action.

Associated errors

none

Associated keywords

none