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

 

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x