Skip to Content
0

SAP B1 STUDIO: When I select a name from CFL, it does not go into the EditText. Why?

Apr 06, 2017 at 10:29 AM

258

avatar image

Hi, everybody

I am beginning SAP B1 Studio for Visual Studio.

I am working on the example given in the SAP Public document: "Working with SAP Business One Studio Suite".

I am attempting to pick up a value using a CFL, and place it in the EditText, but it does not go into the EditText.

What is missing?

Please see the pictures.

it-edit.jpg

myproblem.jpg

Thanks

Leon

myproblem.jpg (281.1 kB)
it-edit.jpg (200.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Edy Simon Apr 07, 2017 at 12:35 AM
0

Hi Leon,

Same procedure as you would do in older SDK.
Handle the OnAfter ChooseFromList event and put the any value in your text box.

The difference is
In older SDK you would cast the pVal to SAPbouiCOM.ChooseFromListEvent
In this version, you need to cast it to SAPbouiCOM.ISBOChooseFromListEventArg


Regards
Edy

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Hi, Edy

Thanks for your reply.

The SAP document unfortunately did not mention that I have to put an event handler. I thought it was that simple with SAP B1 Studio.

I put the following code in the event handler of the edit text:

 Private Sub EditText0_ChooseFromListAfter(ByVal sboObject As System.Object, ByVal pVal As SAPbouiCOM.SBOItemEventArg) Handles EditText0.ChooseFromListAfter
            Dim pCFL As SAPbouiCOM.ISBOChooseFromListEventArg = Nothing
            pVal = pCFL

But it is incorrect.

Can you please help?

Regards,

Leon

0

Hi Leon,

Instead of pVal = pCFL it should be pCFL = pVal

Regards

Edy

0

Hi Edy

I did as you said, but still not working: the selected value from CFL does not go into the EditText.

What else is missing?

Private Sub EditText0_ChooseFromListAfter(ByVal sboObject As System.Object, ByVal pVal As SAPbouiCOM.SBOItemEventArg) Handles EditText0.ChooseFromListAfter
            
            Dim pCFL As SAPbouiCOM.ISBOChooseFromListEventArg = Nothing
            pCFL = pVal
End Sub
0

Hi Leon,

Whatever you do in older version, you still need to do here,
Including set the EditText datasource value with pCFL.SelectedObjects.GetValue("ColumnName",0)

Regards

Edy

0

Hi Edy

Thanks a lot. I'll try it again.

Best Regards,

Leon

0