%%ItemTitle%%

VLF .NET Snap-in Components

VLF .NET Snap-in Components - Developer's Guide
How to navigate (switch) to a different business object?
Send comments on this topic.

Glossary Item Box

Assuming the current framework is the demo framework, this statement will navigate the framework to the HR Applications - Organizations business object.

Switching to Another Business Object C# Copy Code
this.avManager.avSwitch(VLF.SwitchToType.avBusinessObject, "DEM_ORG", "");

 

If you need to populate the instance list of the target business object right after switching, you need to write a method to do that. Your method has to have one parameter of type VLF.ListManager . When calling avSwitch, use the overload that accepts your populate method. This tells VLF to call your populate method right after it switches to the target business object.

 

Populating Target Instance List C# Copy Code
private void btnShowDetails_Click(object sender, EventArgs e)
{
   this.avManager.avSwitch(VLF.SwitchToType.avBusinessObject, "DEM_ORG_SEC_EMP", "DETAILS", this.AddEmployeeInstances);
}
 
private void AddEmployeeInstances(VLF.ListManager listManager)
{
   listManager.avBeginListUpdate();
   listManager.avClearList();
   try
{
   ...
}
   finally
   {
       listManager.avEndListUpdate();
   }
}

 

© LANSA