Microsoft Edge Try Microsoft Edge A fast and secure browser that's designed for Windows 10 Get started

This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more
Microsoft
Dynamics 365 Community
  • Microsoft 365
  • Azure
  • Office 365
  • Dynamics 365
  • SQL
  • Windows 10
      • Windows Server
      • Enterprise Mobility + Security
      • Power BI
      • Teams
      • Visual Studio
      • Surface for Business
      • AI
      • Internet of Things
      • Azure Cognitive Services
      • Quantum
      • Research
      • Docs
      • TechNet
      • Developer Network
      • Windows Dev Center
      • Windows IT Pro Center
      • FastTrack
      • Partner Network
      • Solution Providers
      • Partner Center
      • Cloud Hosting
      • Education
      • Financial services
      • Government
      • Health
      • Manufacturing & resources
      • Retail
      • Security
      • Licensing
      • AppSource
      • Azure Marketplace
      • Events
    • View all
    Sign in
    • Home
      • Sales
      • Customer Service
      • Field Service
      • Talent
      • Finance and Operations
      • Retail
      • Project Service Automation
      • Marketing
      • Business Central
      • General
      • Microsoft Dynamics CRM
      • Microsoft Dynamics AX
      • Microsoft Dynamics NAV
      • Microsoft Dynamics GP
      • Microsoft Dynamics SL
      • Other Products
    AX Forum Ideas Events
    • Learning Resources
    • Documentation
    • AX Blogs
    • Community News
    • Get Started
    • Introduce Yourself
      • Earn Badges
      • View Badges
      • Compete on Leaderboards
      • View Leaderboards
    • Become an Expert
    • Request a New Blog
    • Provide Feedback
    User Groups

    • Sign In/Sign Up
    • Home
    • Forum
    • Blogs
    • Videos
    • Experts
    • Support
    • Communities
      • Microsoft Dynamics AX
      • Microsoft Dynamics CRM
      • Microsoft Dynamics GP
      • Microsoft Dynamics NAV
      • Microsoft Dynamics SL
      • Other Products
      • Partner Community
      • Envision

    D365O - How to add financial dimension in grid

    • Sign In
    • Home
    • Share
      • Twitter
      • LinkedIn
      • Facebook
      • Email
      • Print
    • RSS
    17 Mar 2017 10:46 PM
    This post outlines the steps; how to add financial dimensions (segmented control) in a grid in D365O.

    Let's assume we are adding new table and form for below explanation;

    New table contains two fields AccountType and LedgerDimension with relation to DimensionAttributeValueCombination table 


    Form looks like this;













    Set properties for segmented control under form design;

    - Auto declaration = Yes
    - Account type field = AccountType
    - Controller class = DimensionDynamicAccountController
    - Filter expression = %1

















    1. Override modified method for LedgerDimension field under form's datasource
    2. Override lookup and checkUserCustomLookup method on ledger dimension segmented control in form desgin















    Datasource | D365O_FinancialDimension | LedgerDimension | modified

    [DataSource]
        class D365O_FinancialDimension
        {
            [DataField]
            class LedgerDimension
            {
                void modified()
                {
                    super();

                    D365O_FinancialDimension_ds.refresh();
                }

            }

        }

    Desgin | D365O_FinancialDimension_LedgerDimension | lookup

            public void lookup()
            {
                switch (D365O_FinancialDimension.AccountType)
                {
                    case LedgerJournalACType::Bank:
                        BankAccountTable::lookupBankAccount(this);
                        break;
                    case LedgerJournalACType::Cust:
                        CustTable::lookupCustomer(this);
                        break;
                    case LedgerJournalACType::FixedAssets:
                        AssetTable::lookupAccountNum(this);
                        break;
                    case LedgerJournalACType::Project:
                        ProjTable::lookupProjId(this, D365O_FinancialDimension);
                        break;
                    case LedgerJournalACType::Vend:
                        VendTable::lookupVendor(this);
                        break;
                    default:
                        super();
                        break;
                }
            }

    Desgin | D365O_FinancialDimension_LedgerDimension | checkUserCustomLookup

    public boolean checkUseCustomLookup(int _accountTypeEnumValue, int _secondaryAccountTypeEnumValue)
            {
                boolean returnValue;
               
                LedgerJournalACType accountType = any2Enum(_accountTypeEnumValue);
                switch (accountType)
                {
                    case LedgerJournalACType::Bank:
                    case LedgerJournalACType::Cust:
                    case LedgerJournalACType::FixedAssets:
                    case LedgerJournalACType::Project:
                    case LedgerJournalACType::Vend:
                        returnValue = true;
                        break;
                    default:
                        returnValue = false;
                        break;
                }
               
                return returnValue;
            }


    Set D365O_FinancialDimensions form as startup object and run the form.























    If you just want to see MainAccount in segmented control.

    set the segmented control property Is default account = True






    Read Complete Post and Comments
    Tags: Dynamics 365 for Operations financial dimensions

    Meet the Author

    Faisal Fareed picture
    Faisal Fareed
    Works for Sable 37 in Australia
    @faisalfareed
    LinkedIn
    Blog
    Website

    About The AX Library

    A blog contains information about Microsoft Dynamics AX core development and functional processes, tricks and trip, tutorials and much more....

    Microsoft Dynamics AX

    Get help on your Microsoft Dynamics AX solution from qualified experts in the forums, read blogs and how-to articles, and watch videos.
    RSS

    Recommended Content

    Financial Dimensions Lookup in Ax 2012
    by Eddie Josling on 21 Nov 2013
    • Suggested Answer
    How to Deploy new Azure environments from LCS
    by Ajit kumar Guttula on 21 Feb 2017
    • 0 comments
    How can I setup financial dimension values?
    by Adam Mulloy on 15 Dec 2011
    • Not Answered
    show and edit financial dimension on purch line grid
    by ChrisR75 on 18 Sep 2017
    • Suggested Answer
    How to set financial dimension values
    by hath on 12 Dec 2017
    • Suggested Answer
    View More

    Top Tags

    _AX General AOS validation AX AX 2009 AX 2012 AX 2012 R3 AX 2012 Security AX 7 AX Forms ax upgrade BatchJob Dynamics 365 AX7 Dynamics 365 for Operations excel import Financial Management Integration MS Project project accounting queries SQL Server Commands SSRS Sysoperation Framework Visual Studio X++ XML

    What's new

    • Surface Book 2
    • Surface Pro
    • Xbox One X
    • Xbox One S
    • VR & mixed reality
    • Windows 10 apps
    • Office apps

    Store & Support

    • Account profile
    • Download Center
    • Sales & support
    • Returns
    • Order tracking
    • Store locations
    • Support
    • Buy online, pick up in store

    Education

    • Microsoft in education
    • Office for students
    • Office 365 for schools
    • Deals for students & parents
    • Microsoft Azure in education

    Enterprise

    • Microsoft Azure
    • Enterprise
    • Data platform
    • Find a solutions provider
    • Microsoft partner resources
    • Microsoft AppSource
    • Manufacturing & resources
    • Financial services

    Developer

    • Microsoft Visual Studio
    • Windows Dev Center
    • Developer Network
    • TechNet
    • Microsoft Virtual Academy
    • Microsoft developer program
    • Channel 9
    • Office Dev Center

    Company

    • Careers
    • About Microsoft
    • Company news
    • Privacy at Microsoft
    • Investors
    • Diversity and inclusion
    • Accessibility
    • Security
    English (United States)
    • Contact Us
    • Privacy & Cookies
    • Terms of Use
    • Trademarks
    • © Microsoft 2018