Hi all.
Today I am trying to create via SDK a deposit, but we're facing a problem: The SDK creates the Deposit with the default series regardless the value specified in the Deposits.Series property.
I even specified a random number for the Deposit Series and it was ignored. No error or anything.
Attached is an image of the deposit created, as you can see the series is the default ("Primaria")
Here is the code I use:
try
{
SAPbobsCOM.CompanyService companyService = oCompany.GetCompanyService();
SAPbobsCOM.DepositsService MyDepositService;
MyDepositService = (SAPbobsCOM.DepositsService)companyService.GetBusinessService(SAPbobsCOM.ServiceTypes.DepositsService);
SAPbobsCOM.Deposit MyDeposit = (SAPbobsCOM.Deposit)MyDepositService.GetDataInterface(SAPbobsCOM.DepositsServiceDataInterfaces.dsDeposit);
SAPbobsCOM.DepositParams dpsParamAdd = (SAPbobsCOM.DepositParams)MyDepositService.GetDataInterface(SAPbobsCOM.DepositsServiceDataInterfaces.dsDepositParams);// = dpService.AddDeposit(dpsAddCash);
MyDeposit.DepositType = SAPbobsCOM.BoDepositTypeEnum.dtCash;
MyDeposit.DepositDate = DateTime.Today;
MyDeposit.DepositCurrency = "QTZ";
MyDeposit.Series = 59;
MyDeposit.AllocationAccount = "_SYS00000000001";
MyDeposit.DepositAccount = "_SYS00000000005";
MyDeposit.TotalLC = 66;
dpsParamAdd = MyDepositService.AddDeposit(MyDeposit);
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
So, the question is:
Can I change a Deposit Series through SDK?