Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2823

Re: Update and remove record from UDO using DI API

$
0
0

Thanks Pedro, it worked. It appears that i did not include the Delete upon registering, to avoid having the user messing around with data. Code Worked.

 

 

 

C# code based on Pedro's Post:

 

SAPbobsCOM.GeneralService oGeneralService;

                SAPbobsCOM.GeneralDataParams oGeneralParams;

                SAPbobsCOM.CompanyService sCmp;

                sCmp = Globals.oCompany.GetCompanyService();

                //Get a handle to the SM_MOR UDO 

                oGeneralService = sCmp.GetGeneralService("ENTER YOUR UDO ID");

                //Delete UDO record 

                oGeneralParams = (SAPbobsCOM.GeneralDataParams)oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralDataParams);

                oGeneralParams.SetProperty("DocEntry", "2"); //← Deleting 2nd record

                oGeneralService.Delete(oGeneralParams);


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>