Introductory avSwitch Examples

Visual LANSA Framework

Introductory avSwitch Examples 

Note that avSwitch can only call Framework applications. You cannot use it to call external applications such as Notepad.exe.

AvSwitch Method Examples for Windows or WAMs

Description

Invoke #avFrameworkManager.avSwitch

To(Framework)

Execute(Tax_Calculator)

Caller(#Com_Owner)

 

Switches control to the Framework and executes the command handler associated with the command named "Tax_Calculator".

 

Invoke #avFrameworkManager.avSwitch

To(Framework)

Execute('*EXIT')

Caller(#Com_Owner)

 

 

 

Switches control to the Framework and executes the command handler associated with the command named "*EXIT". This switch would cause the Framework to close down. It is handled exactly as if the user selected "File" then "Exit" from the menu bar.

 

Invoke #avFrameworkManager.avSwitch 

To(Application) 

Named(GeneralLedger)

Caller(#Com_Owner)

 

 

Switches control over to the application named "GeneralLedger". No command is executed.

 

Invoke #avFrameworkManager.avSwitch

To(BusinessObject) 

Named(Customers)

Caller(#Com_Owner)

 

 

Switches control over to the business object named "Customers". No command is executed.

 

Invoke #avFrameworkManager.avSwitch

To(BusinessObject)

Named(Customers) 

Execute(New)

Caller(#Com_Owner)

 

 

Switches control over to the business object named "Customers" and then executes the command named "New".