on 05-10-2016 7:25 PM
Dear All,
How to Call UDO in EditTextBox using SAP B1 SDK?
Hi Lakshmi,
What do you mean with call? You can bind an edittext to your UDO.
Parameters
Bound
Indicates whether to bind or unbind the item:
False: Unbind (default)
True: Bind
TableName
The name of a database table. For user data sources, leave this field empty.
Alias
For DBDataSource: The alias of a database field
For UserDataSource: The unique ID of the user data source
Remarks
This method is valid for user-defined items only.
Example
Binding a data source to an item (Visual Basic)
Public Sub BimdingDataSourceToItem()
Dim oForm As SAPbouiCOM.Form
Dim oEditText As SAPbouiCOM.EditText
'// Add a form
Set oForm = SBO_Application.Forms.Add("SimpleForm")
'// Add a UserDataSource to the form
oForm.DataSources.UserDataSources.Add "EditSource", dt_SHORT_TEXT, 20
'//*************************
'// Adding a TextEdit item
'//*************************
Set oEditText = oForm.Items.Add("EditText1", it_EDIT).Specific
'// Bind the text box to the UsedDataSource
oEditText.DataBind.SetBound True, "", "EditSource"
End Sub
See Also
DataBind Object
More information in the SDK Help Center and in the Samples directory.
Best regards,
Pedro Magueija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pedro,
Thanks for your reply. I tried it. But It does not work. Ok i will explain my Task.
Run the application ,It does not work, Why?
Hi Lakshmi,
When you create a UDF on a system table then it becomes automatically part of the object for that table (in your case BP). All you have to do is bind the textbox to the correct column and table.
DataSource will be OCRD
Alias will be U_TheNameOfYourColumn
For some reason my Studio didn't let me type the datasource so copy one that already has the values such as the cardcode.
Best regards,
Pedro Magueija
Hi Lakshmi,
Did you also add the UDO to the form properties?
Pedro Magueija
If this answer is helpful or correct, marking it as such is a form of saying thank you.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.