Description
Adds a row to the database table of the current UDO.
The data for the row is contained in the GeneralData object passed to the method.
Syntax
Parameters
Return Type
The key of the new row.
Example
| Adding a UDO record (Visual Basic) | Copy Code |
|---|
Dim oGeneralService As SAPbobsCOM.GeneralService
Dim oGeneralData As SAPbobsCOM.GeneralData
Dim oSons As SAPbobsCOM.GeneralDataCollection
Dim oSon As SAPbobsCOM.GeneralData
Dim sCmp As SAPbobsCOM.CompanyService
sCmp = oCompany.GetCompanyService
oGeneralService = sCmp.GetGeneralService("SM_MOR")
oGeneralData = oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralData)
oGeneralData.SetProperty("U_Room", "1")
oGeneralData.SetProperty("U_Price", "20")
oGeneralData.SetProperty("U_Name", "David")
oSons = oGeneralData.Child("SM_MOR1")
oSon = oSons.Add
oSon.SetProperty("U_MainDish", "Chicken")
oSon.SetProperty("U_SideDish", "Fries")
oSon.SetProperty("U_Drink", "Cola")
oGeneralService.Add(oGeneralData)
|
|
See Also