Tuesday, April 13, 2021

pamMethod visbility contract class : SysOperationControlVisibilityAttribute

/// <summary>
/// Data contract class for <c>AssetAcquisition</c> SSRS report.
/// </summary>
/// <remarks>
/// This is the Data Contract class for the <c>AssetAcquisition</c> SSRS Report.
/// </remarks>
[DataContractAttribute]
public class AssetAcquisitionContract
{
    boolean showReportingCurrency = false;

    /// <summary>
    /// Hidden parameter for reporting currency column visibility.
    /// </summary>
    /// <param name = "_showReportingCurrency">
    /// boolean value.
    /// </param>
    /// <returns>
    /// Returns True if the current ledger's reporting currency is not blank and it is not same as accounting currency.
    /// </returns>
    [
        DataMemberAttribute, SysOperationControlVisibilityAttribute(false)
    ]
    public boolean parmShowReportingCurrency(boolean _showReportingCurrency = showReportingCurrency)
    {
        if (Ledger::reportingCurrency() && Ledger::accountingCurrency() != Ledger::reportingCurrency())
        {
            showReportingCurrency = true;
        }
        else
        {
            showReportingCurrency = _showReportingCurrency;
        }

        return showReportingCurrency;
    }

}

No comments:

Post a Comment

Table browser URL in D365FO

Critical Thinking icon icon by Icons8