cancel
Showing results for 
Search instead for 
Did you mean: 

How To Add Button in Sales Order in vb.net in SAP B1

Former Member
0 Kudos

Hi,

How to add a Button in Sales order in SAP Business One.

Thanks,

Suresh.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent

Dim oForm As SAPbouiCOM.Form

Dim oBt As SAPbouiCOM.Button

Dim oItm As SAPbouiCOM.Item

oForm = SBO_Application.Forms.Item(pVal.FormUID)

Try

If (pVal.FormTypeEx = "65211") And (pVal.Before_Action = True) Then

oForm.Items.Add("BtnDetails", SAPbouiCOM.BoFormItemTypes.it_BUTTON)

oItm = oForm.Items.Item("BtnDetails")

oItm.LinkTo = "2"

oItm.Left = oForm.Items.Item("2").Left + 68

oItm.Top = oForm.Items.Item("2").Top

oItm.Width = oForm.Items.Item("2").Width + 20

oItm.Height = oForm.Items.Item("2").Height

oForm.DefButton = "BtnDetails"

oBt = oForm.Items.Item("BtnDetails").Specific

oBt.Caption = "Heat Details "

Try

If pVal.FormType = "65211" And pVal.ItemUID = "BtnDetails" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.Before_Action = False Then

LoadFromXML("C:\Program Files\SAP\Heat Details.srf")

End If

Catch ex As Exception

SBO_Application.ShowErrMsg("Event Error et_ITEM_PRESSED: " & ex.Message)

Finally

End Try

End If

' End If

Catch ex As Exception

SBO_Application.MessageBox(ex.Message)

End Try

End Sub

Former Member
0 Kudos

Hi Suresh,

Have you searched the forum? Here is one:

Thanks,

Gordon