Skip to Content

How to display value to User Defined Field of form in SDK?

Hi all,

I created user defined field called (U_return) in SAP B1 document I want to take value in SDK codes and paste it to that user defined field,

The following is my sample codes

    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
        If pVal.FormType = 133 AndAlso pVal.ActionSuccess = False AndAlso pVal.EventType = BoEventTypes.et_ITEM_PRESSED AndAlso pVal.ItemUID = "1" AndAlso pVal.FormMode = 3 Then
'example of my logic

Dim ReturnValue As Double=20

'If I click Add button and then display the value to user defined field and 'then yes in order to save
End if
End Sub 

How can I achieve that?

Please anyone can help me

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 31, 2017 at 01:29 PM

    string udfFormUID = oApplication.Forms.Item(FormUID).UDFFormUID;

    Form UDFForm = oApplication.Forms.Item(udfFormUID);

    ((EditText)UDFForm.Items.Item("U_return").Specific).Value = "YOURVALUE"

    Your UDF Form should be open to work

    Add comment
    10|10000 characters needed characters exceeded