1
Codeunit 10331 has two major flaws in handling a decimal number.
- After formatting the number and padding the string, THEN it deletes the decimal point leaving the string 1 character short. We handled this in NAV 2018 as below, but this is not possible in BC, there is no event. This simply calls back the base code statement to pad the string.
- The codeunit also completely ignores the "Data Format" field, even though this is filled out in the distribution! The statement in the base code is "Format(Decimal,0,1). This should format the number as "IF "Data Format" <> '' then Format(Decimal,0,"Data Format") ELSE Format (Decimal,0,1)";
Customization from NAV 2018 - the base codeunit has not changed since.
ValueAsString := DELCHR(ValueAsString,'=','.,'); // Base Code
// Customization - restore padding removed by DELCHR with repeat of base statement
IF DataExchColumnDef."Text Padding Required" AND (DataExchColumnDef."Pad Character" <> '') THEN
ValueAsString := StringConversionManagement.GetPaddedString(
ValueAsString,
DataExchColumnDef.Length,
DataExchColumnDef."Pad Character",
DataExchColumnDef.Justification);
//
STATUS DETAILS
New