Associated Instances

You need VLF EPC141006 (or later) to use this feature.

VLF-ONE command handlers support the concept of an 'associated' instance.

When one or more instance level command handler tabs are initially displayed, they are assigned an 'associated' instance – in effect the #avListManager.CurrentInstance at the time they were first opened. 

The associated instance is a #VF_LM003O object – just like the Current or a Selected instance.

The associated item is directly exposed as property #Com_Owner.avAssociatedInstance and its data values can be accessed by method #Com_Owner.avGetAssociatedInstance. In most situations these can be used just like #avListManager.CurentInstance and #avListManager.GetCurrentInstance.

In typical applications where only one set of instance level command handlers can be concurrently open, #avListManager.CurrentInstance and #Com_Owner.avAssociatedInstance can be used interchangeably.

However, if the business object allows multiple concurrently open instances, you will need to use the associated instance instead of the current or selected instance.

Refer to the shipped Advanced example named Multiple Instance. It uses VL reusable parts DF_T61F1O and DF_T61H1O as filter and command handler that allow up to 5 business object instances to be concurrently open.

It is important to note that when using multiple open instances, you should adopt a KISS design approach. Specifically, avoid using things like subtypes, peers, children, and conditionally available command handlers (tabs) to avoid getting into a complexity tangle.