Salesforce

CtxSetName (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

CtxSetName (Magic xpa 4.x)

Lets you set the name of the current context. This name can be used to post a message to a context.

Syntax:

CtxSetName (name)

Parameters:

name: A string defining the context name. The name length cannot be more than 128 characters.

Returns:

True when the operation is successful. The function fails when:

  • A null value was passed

  • An empty string was passed

  • Another context has the same name

Note:

This is very useful for the single instance contexts.

If this function is used in the Task Prefix of the called program (or its Main program), it will not be returned in the Returned Context Id property. This is because the Context ID is set when the context loads and the Task Prefix is available once the context has already been loaded.

See also:

How Do I Set a Different Name for the Current Context?

The Online Samples project (program MT02)

Reference
Attachment 
Attachment