Salesforce

RunMode (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

RunMode (Magic xpa 4.x)

Returns a numeric code corresponding to the engine run mode.

Syntax:

RunMode( )

Parameters:

None

Returns:

-1 – When the Main Program of a project is executed for the first time on an enterprise server.
When the project is closed and another is opened for the first context.

When a project is opened for the first time under a multi-threaded background engine.

0 – When a project is run under a full runtime engine, foreground runtime engine, background runtime engine, or background generator engine.
If the function is evaluated in called programs and subtasks, RunMode returns 0.

1 – When a project is activated from the Tools menu.

2 – When a project is run under a Studio engine and the project is switched to Runtime mode.

3 – When a project is run under a Studio engine and a program is executed directly from the Development mode.

See also:

How Do I Skip the Initialization Code?

The Online and Rich Client Samples projects (program TF07 and RTF07)

Reference
Attachment 
Attachment