4
Hi,
Since Business Central early version, we benefit of new native type, like List or Dictionary.
However, today, there are still certain codeunits which are using old Array system - preventing flexibility and integration without code duplication.
`Calculate Disposal` is one of them - which is using a decimal sized array of 14 in W1 - versus a decimal sized array of 15 in FR version.
Can you replace those array usage by either a List or a Dictionary to improve consistency accross versions, avoid code dupplication and extends integration support ?
- procedure CalcGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: array[14] of Decimal)
+ procedure CalcGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: array[15] of Decimal)
=> procedure CalcGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: Dictionary of [Integer, Decimal])
- procedure CalcSecondGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; LastDisposalPrice: Decimal; var EntryAmounts: array[14] of Decimal)
+ procedure CalcSecondGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; LastDisposalPrice: Decimal; var EntryAmounts: array[15] of Decimal)
=> procedure CalcSecondGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; LastDisposalPrice: Decimal; var EntryAmounts: Dictionary of [Integer, Decimal])
- procedure CalcReverseAmounts(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: array[4] of Decimal)
+ procedure CalcReverseAmounts(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: array[5] of Decimal)
=> procedure CalcReverseAmounts(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: Dictionary of [Integer, Decimal])
- procedure GetErrorDisposal(FANo: Code[20]; DeprBookCode: Code[10]; OnlyGainLoss: Boolean; MaxDisposalNo: Integer; var EntryAmounts: array[14] of Decimal; var EntryNumbers: array[14] of Integer)
+ procedure GetErrorDisposal(FANo: Code[20]; DeprBookCode: Code[10]; OnlyGainLoss: Boolean; MaxDisposalNo: Integer; var EntryAmounts: array[15] of Decimal; var EntryNumbers: array[15] of Integer)
=> procedure GetErrorDisposal(FANo: Code[20]; DeprBookCode: Code[10]; OnlyGainLoss: Boolean; MaxDisposalNo: Integer; var EntryAmounts: array[15] of Decimal; var EntryNumbers: Dictionary of [Integer, Decimal])
Since Business Central early version, we benefit of new native type, like List or Dictionary.
However, today, there are still certain codeunits which are using old Array system - preventing flexibility and integration without code duplication.
`Calculate Disposal` is one of them - which is using a decimal sized array of 14 in W1 - versus a decimal sized array of 15 in FR version.
Can you replace those array usage by either a List or a Dictionary to improve consistency accross versions, avoid code dupplication and extends integration support ?
- procedure CalcGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: array[14] of Decimal)
+ procedure CalcGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: array[15] of Decimal)
=> procedure CalcGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: Dictionary of [Integer, Decimal])
- procedure CalcSecondGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; LastDisposalPrice: Decimal; var EntryAmounts: array[14] of Decimal)
+ procedure CalcSecondGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; LastDisposalPrice: Decimal; var EntryAmounts: array[15] of Decimal)
=> procedure CalcSecondGainLoss(FANo: Code[20]; DeprBookCode: Code[10]; LastDisposalPrice: Decimal; var EntryAmounts: Dictionary of [Integer, Decimal])
- procedure CalcReverseAmounts(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: array[4] of Decimal)
+ procedure CalcReverseAmounts(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: array[5] of Decimal)
=> procedure CalcReverseAmounts(FANo: Code[20]; DeprBookCode: Code[10]; var EntryAmounts: Dictionary of [Integer, Decimal])
- procedure GetErrorDisposal(FANo: Code[20]; DeprBookCode: Code[10]; OnlyGainLoss: Boolean; MaxDisposalNo: Integer; var EntryAmounts: array[14] of Decimal; var EntryNumbers: array[14] of Integer)
+ procedure GetErrorDisposal(FANo: Code[20]; DeprBookCode: Code[10]; OnlyGainLoss: Boolean; MaxDisposalNo: Integer; var EntryAmounts: array[15] of Decimal; var EntryNumbers: array[15] of Integer)
=> procedure GetErrorDisposal(FANo: Code[20]; DeprBookCode: Code[10]; OnlyGainLoss: Boolean; MaxDisposalNo: Integer; var EntryAmounts: array[15] of Decimal; var EntryNumbers: Dictionary of [Integer, Decimal])
STATUS DETAILS
Needs Votes
Comments
Totaly agree
Category: Development
The use of the old Array management should be made obsolete
Category: Development
Business Central Team (administrator)
Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team