web
You’re offline. This is a read only version of the page.
close
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 30

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!

I have the same question (0)
  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi @rp@n,

    Before deciding if you need to write any lookup method, you need to check if there is already EDT with lookup capabilities for the table available. You can achieve it by using cross-references and searching by EDT with relation to the table or with the property "Reference table" equal to the table name.

    In your case table name is DimensionHierarchy and there is already EDT for it with lookup capabilities DimensionHierarchyId. You can try to use this EDT in contract and lookup should be available without any additional actions.

  • @rp@n Profile Picture
    30 on at

    Sergei,

    now i set in dialog value of dimension set. but i need only those values from dimension set , which having structure type =  dimension set

    i need to write lookup method rite?

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi @rp@n,

    Yes, in this case, you need to write a lookup method. And also there is out of the box lookup method DimensionHierarchy::lookupDimensionSet which you can utilize in the dialog.

  • @rp@n Profile Picture
    30 on at

    Class - LedgerTransListAccountContract

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

    can you please let me know what exactly where to write to get dimension set only?

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi @rp@n,

    You need to modify UI builder class LedgerTransListAccountUIBuilder to override lookup method.

    Check by cross-references how method DimensionHierarchy::lookupDimensionSet is used.

    For example in LedgerReconciliationUIBuilder.

  • @rp@n Profile Picture
    30 on at

    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!

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    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
    30 on at

    Thanks a lot Sergei,

  • @rp@n Profile Picture
    30 on at

    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

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi @rp@n,

    What kind of error you got?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans