Several global constants are available at runtime in a script.


The main global constant is the Context object, the contents of which depend on the location of the script. For process scripts, Context contains information about an instance of that process. Context is an object with a list of user-defined fields (read more Object Types). For example, if you add a field of string type and the code foo to the Context tab, you will be able to interact with in the following way: = 'some  string';

Context is much like an application element, except that it has no save or delete methods. It is saved automatically at the end of a


If the process is inside an app, the Application object is always available, providing methods to work with the current app. For example, you can create a new order

const order = Application.create(); =; 


If the process belongs to a workspace, it can have the Namespace object available containing all the apps in that workspace. Thus a description of a particular app can be obtained as

const clientOrders = await
    .where(f =>  f.client.eq( 


The script may also contain the Global object with a description of
all workspaces. Using this object prevents further export of the script, i.e., if you use this object in a process script in a workspace or an app, that workspace or app will not be available for export. The Global object contains all available workspaces in the ns field, that is, if you create a store workspace with an orders app, then its description can be obtained as

const clientOrders = await
    .where(f =>  f.client.eq( 

Read more about working with app in Working with apps. The Global constant is always available in company processes. Workspace and app processes
must be able to access this constant.

Launching processes

It is also possible to launch processes from Namespace and Application objects.

await{param: 1});
await{param: 1}); 
await{param: 1}); 
await{param: 1}); 

For details see description of the Process.


In the System object, such system collections as users, user groups, organizational chart and others are available.


In the widget client scripts the global constant Server is available. In the Server object, the methods from the widget's server script can be called.

await  Server.rpc.doSomething()