Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

required to show financial dimension set in report dialog

(0) ShareShare
ReportReport
Posted on by 6

hi all,

i have to required to show financial dimension set in report dialog. Kindly let me how i will achieve this.

finanDim.jpg

shall i need to write lookup?

please give me more shed on this.

thanks!

  • Mohammed999 Profile Picture
    10 on at
    RE: required to show financial dimension set in report dialog

    Hi 

    I have same error massage in ledger trans list report after doing this code to the classes can help please ?7762.error.jpg

  • Sergei Minozhenko Profile Picture
    23,091 on at
    RE: required to show financial dimension set in report dialog

    Hi @rp@n,

    Try to refresh caches in development workspace Tools -> Caches. Compile contract class and UI build class.

  • @rp@n Profile Picture
    6 on at
    RE: required to show financial dimension set in report dialog

    error8.jpg

    but the parm method is already there in contract class

  • @rp@n Profile Picture
    6 on at
    RE: required to show financial dimension set in report dialog

    Sergei,

    is there any thing wrong?

  • @rp@n Profile Picture
    6 on at
    RE: required to show financial dimension set in report dialog

    6064.error5.jpg

  • Sergei Minozhenko Profile Picture
    23,091 on at
    RE: required to show financial dimension set in report dialog

    Hi @rp@n,

    What kind of error you got?

  • @rp@n Profile Picture
    6 on at
    RE: required to show financial dimension set in report dialog

    Sergei,

    yesterday dimension set is working fine and i able to get value from there but i got below error when trying to open the dialog

    Class - LedgerTransListAccountContract

    method - parmDimensionSet method

    // Added by Arpan 11-08-2020
    // 1.
    [
        DataMemberAttribute('DimensionSet'),
        SysOperationLabelAttribute(literalstr("Dimension set")),
        SysOperationHelpTextAttribute(literalstr("Dimension set")),
        SysOperationGroupMemberAttribute('Dimension set'),
        SysOperationDisplayOrderAttribute('4')
    ]
    public Name parmDimensionSet(Name _dimensionSet = dimensionSet)
    {
        dimensionSet = _dimensionSet;
        return dimensionSet;
    }

    UI builder class- 

    /// 
    /// The LedgerTransListAccountUIBuilder class is used to manage the parameter form for the
    /// LedgerTransListAccount report.
    /// 
    class LedgerTransListAccountUIBuilder extends SrsReportDataContractUIBuilder
    {
        DialogField dialogFieldFromDate, dialogFieldToDate, dialogFieldDateCode;
    
        // Added by Arpan 11-08-2020
        // 1.
        DialogField dialogFieldDimSet;
        // end
    }

    postrun method

    eerror9.jpg

    what is wrong here?

    please give me more shed on this

  • @rp@n Profile Picture
    6 on at
    RE: required to show financial dimension set in report dialog

    Thanks a lot Sergei,

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,091 on at
    RE: required to show financial dimension set in report dialog

    Hi @rp@n,

    In this case, if you use DimensionHierarchy::lookupDimensionSet, calling control should be a string, but time DimensionHierarchyId is Int64. Change for parm method and related class variable type from DimensionHierarchyId to Name (example can be check from LedgerReconciliationContract.parmTrialPrimaryDimension).

  • @rp@n Profile Picture
    6 on at
    RE: required to show financial dimension set in report dialog

    Sergei,

    As suggested by you, i have added below code in LedgerTransListAccountUIBuilder

    public void dimensionSetLookup(FormStringControl _dimensionSetDialogControl)
    {
        DimensionHierarchy::lookupDimensionSet(_dimensionSetDialogControl);
    }

    PostRun method

    /// 
    ///    Registers the dialog field methods to capture events.
    /// 
    public void postRun()
    {
        Dialog dialogLocal = this.dialog();
    
        super();
    
        // This method should be called in order to handle events on dialogs.
        dialogLocal.dialogForm().formRun().controlMethodOverload(false);
    
        dialogFieldDateCode = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(LedgerTransListAccountContract, parmDateCode));
        dialogFieldFromDate = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(LedgerTransListAccountContract, parmFromDate));
        dialogFieldToDate = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(LedgerTransListAccountContract, parmToDate));
    
        // Override the modified method of the Date Interval field so that the From and To dates fields get populated based on the interval selected.
        dialogFieldDateCode.registerOverrideMethod(methodStr(FormStringControl, modified), methodStr(LedgerTransListAccountUIBuilder, dateIntervalModified), this);
    
        // Override the validate method of the Date Interval field.
        dialogFieldDateCode.registerOverrideMethod(methodStr(FormStringControl, validate), methodStr(LedgerTransListAccountUIBuilder, dateIntervalValidate), this);
    
        // run these to sync to the system date
        this.dateIntervalModified(dialogFieldDateCode.control());
    
        // Override the modified method of the From and To date fields so the date interval gets cleared when a date is manually changed.
        dialogFieldFromDate.registerOverrideMethod(methodStr(FormDateControl, modified), methodStr(LedgerTransListAccountUIBuilder, dateModified), this);
        dialogFieldToDate.registerOverrideMethod(methodStr(FormDateControl, modified), methodStr(LedgerTransListAccountUIBuilder, dateModified), this);
    
        // Added by Arpan
        dialogFieldDimSet = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(LedgerTransListAccountContract, parmDimensionSet));
        dialogFieldDimSet.registerOverrideMethod(methodstr(FormStringControl, lookup),methodstr(LedgerTransListAccountUIBuilder, dimensionSetLookup),this);
        // end
    }

    Contract class - LedgerTransListAccountContract

    [
        DataMemberAttribute('DimensionSet'),
        SysOperationLabelAttribute(literalstr("Dimension set")),
        SysOperationHelpTextAttribute(literalstr("Dimension set"))
    ]
    public DimensionHierarchyId parmDimensionSet(DimensionHierarchyId _dimensionSet = dimensionSet)
    {
        dimensionSet = _dimensionSet;
        return dimensionSet;
    }

    but when i going to select value from Dimension set dialog, then got below error

    58666.error.jpg

    how to resolve this. please give me more shed on this.

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,276 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,975 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans