on 03-14-2007 4:30 PM
Hi,
Is it possible to raise a CFL event in code - without a form being open?
I set up code that will look for a default vendor for a given item. If the item has no default vendor, I need to offer the user a CFL to choose one. The card code of the vendor selected by the user needs to be stored in a string variable for further processing.
Thanks,
Mike
Hi
To cacth a Code make the following:
In your Item Event:
<i>Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
Select Case pVal.ItemUID
Case "Your Item with CFL link"
Dim dt As SAPbouiCOM.DataTable
Dim Code,Description As String
dt = GetValueCFL(pVal)
Code = dt.GetValue("CodeField", 0)
Description = dt.GetValue("SlpCode", 0)
</i>
FUNCTION Get Value CFL:
<i> Private Function GetValueCFL(ByVal mypVal As SAPbouiCOM.ItemEvent) As SAPbouiCOM.DataTable
Dim oCFLEvent As SAPbouiCOM.IChooseFromListEvent
Dim sCFL_ID As String
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oDataTable As SAPbouiCOM.DataTable
oCFLEvent = mypVal
sCFL_ID = oCFLEvent.ChooseFromListUID
oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
oDataTable = oCFLEvent.SelectedObjects
Return oDataTable
End Function</i>
Kind Regards !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.