Hi Amit,
If yours is a UDO, use this :
private void Test() { SAPbobsCOM.GeneralService oGeneralService = null; SAPbobsCOM.GeneralData oGeneralData = null; SAPbobsCOM.GeneralDataParams oGeneralParams = null; SAPbobsCOM.CompanyService sCmp = null; SAPbobsCOM.GeneralData oChild = null; SAPbobsCOM.GeneralDataCollection oChildren = null; sCmp = eCommon.oCompany.GetCompanyService(); try { oGeneralService = sCmp.GetGeneralService("UDOName"); // Get UDO record oGeneralParams = ((SAPbobsCOM.GeneralDataParams)(oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralDataParams))); oGeneralParams.SetProperty("DocEntry", DocEntryOfTheRecordToUpdate); oGeneralData = oGeneralService.GetByParams(oGeneralParams); // Add lines on UDO Child Table oChildren = oGeneralData.Child("ChildTableNameWithout@"); // Create data for rows in the child table oChild = oChildren.Add(); oChild.SetProperty("colUID", "TEST"); // Update an existing line oChild = oChildren.Item(1); oChild.SetProperty("colUID", "TEST"); //Update the UDO Record oGeneralService.Update(oGeneralData); } catch (Exception ex) { SBO_Application.MessageBox(ex.Message, 1, "OK", null, null); } }
Regards
Edy