cancel
Showing results for 
Search instead for 
Did you mean: 

Need .Net Code for General Service DI API

Former Member
0 Kudos

Dear Friends,

I want to update one UDO (which is having header and child table). In existing document entry I want to update some existing Line Item rows and want to add some new rows in child table. Can you please provide me some sample code for this.

Thanks

Nitish Mishra

Accepted Solutions (1)

Accepted Solutions (1)

pedro_magueija
Active Contributor
0 Kudos

Hi Nitish,

You can find the sample below in the SDK Help Center. Look for GeneralService Object for more info.

Dim oGeneralService As SAPbobsCOM.GeneralService

Dim oGeneralData As SAPbobsCOM.GeneralData

Dim oChild As SAPbobsCOM.GeneralData

Dim oChildren As SAPbobsCOM.GeneralDataCollection

Dim oGeneralParams As SAPbobsCOM.GeneralDataParams

'Get GeneralService (oCmpSrv is the CompanyService)

Set oGeneralService = oCmpSrv.GetGeneralService("MainUDO")

'Create data for new row in main UDO

Set oGeneralData = oGeneralService.GetDataInterface(gsGeneralData)

oGeneralData.SetProperty "Code", "First"

oGeneralData.SetProperty "U_Data", "my data"

'Create data for a row in the child table

Set oChildren = oGeneralData.Child("ChildUDO")

Set oChild = oChildren.Add

oChild.SetProperty "U_Data", "child data"

oChild.SetProperty "U_Type", 6

'Add the new row, including children, to database

oGeneralService.Add oGeneralData

Good luck.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

Thanks Pedro for your reply. I will try with this....

Answers (0)