VLF-ONE Custom Instance List Execute Default Command Error After EPC Install

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

VLF-ONE Custom Instance List Execute Default Command Error After EPC Install

Post by jyoung »

In VLF-ONE I have a custom instance list where I replaced the default instance list with my own.

It extends from #VF_AC012O.

I had been using "ExecuteDefaultCommand" to trigger the default command for the object as such. The popup is a custom right click menu to allow copying data to the clipboard.

Code: Select all

evtroutine handling(#InstanceList.ItemGotFocus)

define_com class(#vf_lm003O) name(#DataItem) reference(*DYNAMIC)

#DataItem <= #InstanceList.CurrentItem.RelatedReference *As #VF_LM003O

* Make this the current item
#DataItem.avIsCurrent := True

* Show the default command handler
#DataItem.avBusinessObjectReference.ExecuteDefaultCommand atreferencelevel(1) usebusypanel(#avListManager.RootVF_FR003Owner.CurrentVF_UM010O.BusyPanel) withinstancereferencekey(#DataItem.GetCompositeKeyString) ignoreenablement(False)

#Popup.Caption := #DataItem.avVisualID2
#Popup.ClipboardCopyText := #DataItem.avVisualID1 + " " + #DataItem.avVisualID2
endroutine
After I installed the latest EPCS (31 and 50), I get an error stating "ExecuteDefaultCommand is not a member of component type VF_FR003O". Sure enough, this is one of those internal methods that got renamed to "zInt....".

So my question is how do I trigger the default command from a custom instance list?
MarkDale
Posts: 116
Joined: Wed Dec 02, 2015 10:06 am

Re: VLF-ONE Custom Instance List Execute Default Command Error After EPC Install

Post by MarkDale »

There's a new and better way. The DataItem now has an avExecuteDefaultCommand method, which is much simpler to use.

See shipped example DF_T41I1O.


Evtroutine Handling(#xEmployeeList.ItemGotFocus)

Define_Com Class(#vf_lm003O) Name(#DataItem) Reference(*DYNAMIC)

#DataItem <= #xEmployeeList.CurrentItem.RelatedReference *As #VF_LM003O

* Make this the current item

#DataItem.avIsCurrent := True

* Show the default command handler
#DataItem.avExecuteDefaultCommand


Endroutine
Post Reply