Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
mk1909_sap
Active Participant
0 Kudos
Hello Team,

Greetings For the Day !!!

Kindly find following code to Update Records in UDO (User Defined Objects) in SAP Business One 10.0 through SAP B1 GeneralService.
SAPbobsCOM.GeneralService oGeneralService;
SAPbobsCOM.GeneralData oGeneralData;
SAPbobsCOM.GeneralDataParams oGeneralParams;
SAPbobsCOM.CompanyService sCmp;
sCmp = Main.Mahi_Company.GetCompanyService();
oGeneralService = sCmp.GetGeneralService("Enquiry"); //User Defined Object
oGeneralParams = oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralDataParams);
oGeneralParams.SetProperty("DocEntry", DocEntry);
oGeneralData = oGeneralService.GetByParams(oGeneralParams);
oGeneralData.SetProperty("U_CardCode", CardCode); //User Defined Field
oGeneralService.Update(oGeneralData);
Main.Mahi_Application.StatusBar.SetText("Customer Code updated successfully in Enquiry.",SAPbouiCOM.BoMessageTime.bmt_Short,SAPbouiCOM.BoStatusBarMessageType.smt_Success);

 

Thanks,

Mahendrakumar