Skip to Content
Technical Articles
Author's profile photo Mahendrakumar Phadtare

How to Update Record in UDO in SAP Business One 10.0 Using GeneralService

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

 

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.