Salesforce

CtxSetName (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

CtxSetName (Magic xpa 3.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 contexts that are single instances.

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.

If you change the name of a context using the CtxSetName, you should be aware that the context name may no longer be unique. This may cause a problem when interacting between contexts.

See also:

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

The Online Samples project (program MT02)

Reference
Attachment 
Attachment