Salesforce

How Can We Load a Component Dynamically (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Can We Load a Component Dynamically (Magic xpa 3.x)

There are instances in which we wish to load a component dynamically or even conditionally. We may wish to load a certain component according to one condition and a different component according to a different condition. We may even need to dynamically call different programs of the same component according to a condition.

This is made possible by using the Call option of the By Name operation. These are regular programs called according to their public name. If the public name is not found in the application, the program will be treated as a non-existent program.

How do you call a dynamic program?

Using a Call By Name operation, we call a public program defined in the called application. The called application behaves like a regular component. It will be loaded in the regular manner, outlined previously in this section. Once the application is loaded, the public program will be called.

The definition of which Cabinet file to call and which program to call are defined using expressions.

The figure below shows an example of how to call a dynamic program.


Important:

If the public name does not exist, the call will be handled like any call to a non-existing program.

Hint:

If the Cabinet file expression is calculated to be a blank value, the search for the public name will be in the current application.

Reference
Attachment 
Attachment