Description
Updates an existing dunning term.
The data for the dunning term, including the key of the dunning term to be updated, is contained in the DunningTerm object passed to the method. To update a dunning term, you must first retrieve it using the GetDunningTerm method.
Syntax
Parameters
Example
| Updating a dunning term (C#) | Copy Code |
|---|
SAPbobsCOM.DunningTermsService dts = globals_Renamed.oCompany.GetCompanyService().GetBusinessService(ServiceTypes.DunningTermsService) as DunningTermsService; SAPbobsCOM.DunningTermParams dtp = dts.GetDataInterface(DunningTermsServiceDataInterfaces.dtsDunningTermParams) as DunningTermParams; dtp.Code = "Code5327"; SAPbobsCOM.DunningTerm dt = dts.GetDunningTerm(dtp); string code; string name; code = dt.Code; name = dt.Name; SAPbobsCOM.BoYesNoEnum applyHighestLetter = dt.ApplyHighestLetterTemplate; SAPbobsCOM.CalculateInterestMethodEnum calculateInterestMethod = dt.CalculateInterestMethod; dt.DaysInMonth = 28; dt.DaysInYear = 30; SAPbobsCOM.GroupingMethodEnum groupMethod = dt.GroupingMethod; SAPbobsCOM.BoYesNoEnum includeInterest = dt.IncludeInterest; SAPbobsCOM.ExchangeRateSelectEnum exchangeRateSelect = dt.ExchangeRateSelect; double letterFee = dt.LetterFee; string currency = dt.LetterFeeCurrency; double minBalance = dt.MinimumBalance; string minCurrency = dt.MinimumBalanceCurrency; double interestRate = dt.YearlyInterestRate; int count = dt.DunningTermLines.Count; SAPbobsCOM.DunningTermLine dtl = dt.DunningTermLines.Item(0); SAPbobsCOM.DunningTermLine dtl2 = dt.DunningTermLines.Item(1); dtl2.CalculateInterest = BoYesNoEnum.tNO; try { dts.UpdateDunningTerm(dt); } catch (Exception ex) { MessageBox.Show(ex.Message); } |
|
See Also