on 05-08-2013 4:06 PM
Hello Experts,
I have a UDF that I would like to be bound to a option/radio button on marketing documents (Sales Order in particular). I am able to create the OptionBtn in the usual way and add it to the Sales order through the SDK but I do not understand how to bind it to my UDF. Any ideas?
I am able to bind it to a user data source, but how to bind this to my UDF?
Here is the relevant code:
Dim SORadioItem As SAPbouiCOM.Item = Me.m_oForm.Items.Add(CONSTANTS.SALES_ORDER_SO_RAD, SAPbouiCOM.BoFormItemTypes.it_OPTION_BUTTON)
Dim WORadioItem As SAPbouiCOM.Item = Me.m_oForm.Items.Add(CONSTANTS.SALES_ORDER_WO_RAD, SAPbouiCOM.BoFormItemTypes.it_OPTION_BUTTON)
Dim QuoteRadioItem As SAPbouiCOM.Item = Me.m_oForm.Items.Add(CONSTANTS.SALES_ORDER_QUOTE_RAD, SAPbouiCOM.BoFormItemTypes.it_OPTION_BUTTON)
SORadioItem.Left = 225
SORadioItem.Width = 75
SORadioItem.Top = 469
SORadioItem.Height = 19
WORadioItem.Left = 225
WORadioItem.Width = 75
WORadioItem.Top = 489
WORadioItem.Height = 19
QuoteRadioItem.Left = 225
QuoteRadioItem.Width = 75
QuoteRadioItem.Top = 509
QuoteRadioItem.Height = 19
Dim SORadio As SAPbouiCOM.OptionBtn = SORadioItem.Specific
Dim WORadio As SAPbouiCOM.OptionBtn = WORadioItem.Specific
Dim QuoteRadio As SAPbouiCOM.OptionBtn = QuoteRadioItem.Specific
SORadio.Caption = "Sales Order"
WORadio.Caption = "Work Order"
QuoteRadio.Caption = "Quote"
WORadio.GroupWith(CONSTANTS.SALES_ORDER_SO_RAD)
QuoteRadio.GroupWith(CONSTANTS.SALES_ORDER_SO_RAD)
SORadio.ValOn = "S"
WORadio.ValOn = "W"
QuoteRadio.ValOn = "Q"
' Not correct:
'SORadio.DataBind.SetBound(True, "", Me.m_oForm.DataSources.UserDataSources.Item("U_SODraftType").UID)
'Bind to user data source, but how to bind the user data source to my UDF???????
Me.m_oForm.DataSources.UserDataSources.Add("DrftTyp", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 9)
SORadio.DataBind.SetBound(True, "", "DrftTyp")
WORadio.DataBind.SetBound(True, "", "DrftTyp")
QuoteRadio.DataBind.SetBound(True, "", "DrftTyp")
SORadio.Selected = True
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
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.