cancel
Showing results for 
Search instead for 
Did you mean: 

add new link button with edit textbox on a/r invoice

bhavank_gajjar
Active Contributor
0 Kudos

hello experts,

i want to add link button with edit text box for buyer code from bp master and buyer name on a/r invoice SBO form.

and under logistics tab of a/r invoice i want to add ship to,bill to and ship type for buyer like customer

Regards,

Bhavank

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

you can call the A/R invoice form through MenuId

like Me.SBO_Application.ActivateMenuItem("2053")

then make a class for it and then in this class(Load event) add link button before the Customer Code text box

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello freind

yu can do it on your item event and case load event where yu can add text ox or link button by taking the form uid of specific form for creating text box by programing yu can uese sdk .follwing path of the sdk

C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\07.ComplexForm

yu can use this code for it

If ((pVal.FormType = 65300 (FORM UID) And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then

Try

Dim oDType As SAPbouiCOM.EditText

'// get the event sending form

oSaleForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)

If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then

oItem = oSaleForm.Items.Item("10000330")

oNewItem = oSaleForm.Items.Add("Baldue", SAPbouiCOM.BoFormItemTypes.it_BUTTON)

oNewItem.Left = oItem.Left - 70

oNewItem.Width = oItem.Width - 35

oNewItem.Top = oItem.Top

oNewItem.Height = oItem.Height

oButton = oNewItem.Specific

oButton.Caption = "Balance list"

End If

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try

'End If

End If