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 :
Microsoft Dynamics AX (Archived)

Showing Financial Dimension Tab drop-down fields in a grid

(0) ShareShare
ReportReport
Posted on by 3,110

JournalFinancialTab.pngJournalOverviewTab.png

Dear Experts,

I want to bring these two financial dimension fields in overview grid of journal how to do it . Thanks in advance. Movement journal 

Thanks and Regards,

Shabir Ahmad

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Heinz Schweda Profile Picture
    1,367 on at

    Hi,

    you can simply use a display method on the formdatasource like the following:

    public display DimensionValue showDimensionCostCenter(SalesTable _salesTable)
    {
        DimensionValue costCenter;
        DefaultDimensionView DefaultDimensionView;
        #define.CostCenter("Costcenter")
    
        select firstOnly DisplayValue
        from DefaultDimensionView
        where DefaultDimensionView.Name == #CostCenter
            && DefaultDimensionView.DefaultDimension == _salesTable.DefaultDimension;
    
        costCenter = DefaultDimensionView.displayValue;
    
        return costCenter;
    }

    Kind regards,

    Heinz

  • Shabir Ahmad Profile Picture
    3,110 on at

    Thanks to both of you,Crispin John Augustine and Heinz Schweda,

    Crispin John Augustine i am happy with your way of field group and please share the code for display dimensions on overview grid.

    Thanks and Regards,

    Shabir Ahmad

  • Shabir Ahmad Profile Picture
    3,110 on at

    Crispin John Augustine,

    sorry for late reply, may i know about this process, means that should i make first a group for fields or what?? Or Should i write this code directly to the form.

    Thanks for your kind response.

    Thanks and best regards,

    Shabir Ahmad

  • Shabir Ahmad Profile Picture
    3,110 on at

    Heinz Schweda ,

    Thanks for your code and effort you put on it, but please tell me, how should i add this code to form, Form Data-source or make new group in overview grid and then right this code there.

    Thanks and Regards,

    Shabir Ahmad

  • Suggested answer
    Heinz Schweda Profile Picture
    1,367 on at

    Hi Shabir,

    my code is designed to put it in the methods-node of your datasource in your form. Afterwards you have to create a StringEdit-Objekt in your grid (or another fieldgroup), set the property DataSource to SalesTable, set the property DataMethod to the name of your new method (e.x. showDimensionCostCenter).

    Alternativly you can add the method to the methods node in the table SalesTable, in this case you have to remove the parameter _salesTable and use "this" within the method instead. Adding a control to your form works the same way as written above.

    In both scenarios you should think about display method caching.

    Kind regards,

    Heinz

  • Shabir Ahmad Profile Picture
    3,110 on at

    formclassimage.pngFormdeclarationcode.png

    Crispin John Augustine,

    First of all sorry for late reply, the next thing is i declare variable in declaration class of Form and when i tried to do your 2nd point to write the code in init method after super(). I got the error as shown above in the image the error is "Argument '_tabPageControlContainer' is incompatible with the required type".

              FormErrorPopup.png

    formclassimage.png

    Thanks and Regards,

    Shabir Ahmad

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans