Salesforce

CtxClose (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

CtxClose (Magic xpa 3.x)

Gracefully closes a context and removes it from the Active Context list. When closing an active context, the engine properly closes all running programs, and clears the context from the Active Context list.

Syntax:

CtxClose (context entry or identifier, wait)

Parameters:

context entry or identifier: A number representing the context. This number can be either the context entry number in the current context list or the actual context identifier.

wait: Logical.
If True, it will wait until the context is inactive.
If False (default), it will not wait.

Returns:

True when the specified context is removed.

False when:

  • The context is not found.

  • The function is used to close its own context (when used with Wait = True)

  • The function is used to close a non-existing context (when used with Wait = True)

Note:

Only pending contexts can be removed.

When the wait parameter is set to False, the CtxClose function behaves like the RqCTxTrm function.

For Rich Client applications, the Deployment mode has to be set to Background.

Before evaluating the CtxClose function, you should load the contexts list by evaluating the CtxNum function.

See also:

CtxKill

The Online and Rich Client Samples projects (program ES01 and RES01)

Reference
Attachment 
Attachment