cancel
Showing results for 
Search instead for 
Did you mean: 

Pop up new form(Purchase Order) with current data

Former Member
0 Kudos

Dear All,

i have created a COPY TO button in my addon form. Now my quiry is that when ever i press the COPY TO button the purchase order form will open with my addon form data. Kindly suggest me the code.

Thanx

Sanjoy Paul

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi...

use this code...

Try

SBO_Application.ActivateMenuItem("2305")

oForm = SBO_Application.Forms.ActiveForm

OItem = oForm.Items.Item("4")

Oedit = OItem.Specific

Oedit.Value = vendor.ToString()

rs1 = Nothing

rs1 = OCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

'rs1.DoQuery(" Select Ur Table")

'OItem = OPOForm.Items.Item("aaa")

'Oedit = OItem.Specific

'Oedit.Value = rs1.Fields.Item("Ur - Field").Value & ""

OItem = OPOForm.Items.Item("bbb")

Oedit = OItem.Specific

Oedit.Value = rs1.Fields.Item("Ur - Field").Value & ""

Catch ex As Exception

SBO_Application.MessageBox(ex.Message)

End Try

REM Matrix

OItem = oForm.Items.Item("38")

oMatrix = OItem.Specific

oCols = oPoMat.Columns REM Columns

Oedit = oCols.Item("1").Cells.Item(1).Specific 'item no

Oedit.Value = itmcd.ToString()

It Will Work...

Regards...

Billa 2007

Answers (0)