Show / Hide Table of Contents

    AddDateFormula Procedure

    Codeunit Date Formulas

    Adds a new Date Formula to the system.

    Signature

    [InherentPermissions(PermissionObjectType::TableData, Database::"QWEEG Date Formula", 'RIM')]
    AddDateFormula(Code: Code[20]; Description: Text; DateFormulaText: Text)
    

    Parameters

    Code Code[20]

    The code of the Date Formula. This code must be unique, otherwise the existing Date Formula will be overwritten. Try to use the same naming convention as the standard Date Formulas.

    Description Text

    The description of the Date Formula, as shown to the user.

    DateFormulaText Text

    The definition of the Date Formula, formatted as text. The text must be a valid AL date formula in the generic, nonlanguage-dependent format. I.e. 'CD' for Current Day, or 'CY' for Current Year. The date formula expression will be surrounded with < and >, as specified for date formulas at Microsoft Learn.

    Example

    DateFormulas.AddDateFormula('7D', '7 Days ahead', '7D');
    DateFormulas.AddDateFormula('LD_CY', 'Last Day of Current Year', '-CY-1D+1Y');
    

    This documentation is generated from Eagle v27.0

    Back to top Copyright © 2020 SmartApps
    Generated by DocFX