web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

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

Adding default dimensions to form ProcCategoryHierarchyManagement

(1) ShareShare
ReportReport
Posted on by 8
Hello,
 
I have extended EcoResCategory to add new field XXXDefaultDimension. I need to add the financial dimension tab page like in the standard D365FO on the ProcCategoryHierarchyManagement form. I have hence added a new tab page with Dimension pattern and a new DimensionEntryControl which has data source EcoResCategory and field value XXXDefaultDimension. However, the dimension control is not appearing and instead there is an error message saying 'Account structures that include financial dimensions have not been selected for the ledger.' I have also added the class LedgerDefaultDimensionEntryController as controller class as parameter in the form design. The error still pertains.

I had already done a similar customization on the MarkupTable form and it works perfectly fine over there.
Has anyone encountered this issue?
I have the same question (0)
  • Jason0810M Profile Picture
    8 on at
    Adding default dimensions to form ProcCategoryHierarchyManagement
    Hello Srihari,
     
    You need to create a new table XXXPurchReqTableDefaultDimension similar to HcmPositionDefaultDimension. Your new table needs to have the fields PurchReqTableRecId, DefaultDimension and LegalEntity similarly. You then need to create a new form XXXPurchTableTableDefaultDimensionDialog similar to HcmPositionDefaultDimensionDialog. This will be used to create a dimension tab per legal entity given that the form for purch req is a shared form. You need to add the table XXXPurchReqTableDefaultDimension as datasource on the PurchReqTable form.

    The issue on your screenshot is that DimensionEntryControl is being recognized as FormContainerControl.
    FormContainerControl does not contain the methods parmCompany & reactivate.
    You could declare a new variable of type DimensionEntryControl. e.g
    DimensionEntryControl a = DimensionEntryControl as DimensionEntryControl.
    You would then be able to use the methods parmCompany & reactivate. However, this will not fix your issue.
    Just using 
    XXXDimensionEntryControl.parmCompany(curExt());
    XXXDimensionEntryControl.reactivate(); in the init will not solve this issue as if you change company, the dimension values might not adhere to the correct dimension RecIds if you have a multi company environment.
    Kindly adhere to the standard usage of HcmPositionDefaultDimension table and HcmPositionDefaultDimensionDialog form in the case of the default dimensions for HcmPosition (shared table similar to PurchReqTable).
     
  • Suggested answer
    Srihari.molaka Profile Picture
    339 on at
    Adding default dimensions to form ProcCategoryHierarchyManagement
    Hi Jason,
    Hope you are doing good,
    I'm also facing the same issue, as you mentioned tried the same logic but giving some error,
    I have written this logic in post init method of purchreqtable form and DimensionEntry is the control name. For that control the controller class is LedgerDimensionEntryController.
    Note: Checked the model reference of mymodel, the required models are there like Dimensions and ledger.
    Can you help me to correct this error.
     
    Thanks and regards,
    Srihari.
  • Jason0810M Profile Picture
    8 on at
    Adding default dimensions to form ProcCategoryHierarchyManagement
    *I have also followed the same concept done with HcmPosition and HcmPositionDefaultDimension (as suggested by Andre).
    This fixed my problem.
  • Jason0810M Profile Picture
    8 on at
    Adding default dimensions to form ProcCategoryHierarchyManagement
    *I have also followed the same concept done with HcmPosition and HcmPositionDefaultDimension (as suggested by Andre).
    This fixed my problem.
    ​​​​​​​
  • Verified answer
    André Arnaud de Calavon Profile Picture
    297,483 Super User 2025 Season 2 on at
    Adding default dimensions to form ProcCategoryHierarchyManagement
    Hi Jason,
     
    The EcoResCategory table is a global table, like I mentioned in the link shared by Girish, you would need to have a link to a legal entity. You can consider creating an additional table linked to the EcoResCategory table having the fields EcoResCategory (link to RecId), DefaultDimension and have this table not shared. Like Microsoft did implement this for having dimensions on a worker and positions.
  • Suggested answer
    Waed Ayyad Profile Picture
    8,857 Super User 2025 Season 2 on at
    Adding default dimensions to form ProcCategoryHierarchyManagement
     Hi,
     
    Are you sure you enabed it on this class LedgerDefaultDimensionEntryController ?
     
     
    Regards,
    Waed
  • GirishS Profile Picture
    27,825 Moderator on at
    Adding default dimensions to form ProcCategoryHierarchyManagement
    Hi Jason,
     
    We have similar discussion recently. please go through the below thread and if possible you can ask that in the thread to know whether it is solved.
  • Suggested answer
    Mohit Rampal Profile Picture
    12,563 Moderator on at
    Adding default dimensions to form ProcCategoryHierarchyManagement
    Hi, In addition, check this article to verify you have covered all steps.
     
  • Anton Venter Profile Picture
    20,221 Super User 2025 Season 2 on at
    Adding default dimensions to form ProcCategoryHierarchyManagement
    Hi,
     
    Have you added a relation on the EcoResCategory table for the DefaultDimension field? Compare the code you have added to the standard and make sure you have added everything. Have you tried to debug the error message to see where it's coming from? This will give you a clue to what's missing. By the way, how is the DefaultDimension on EcoResCategory going to be used in your situation?

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 756 User Group Leader

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 514 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans