Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

Adding default dimensions to form ProcCategoryHierarchyManagement

(1) ShareShare
ReportReport
Posted on by
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?
  • Jason0810M Profile Picture
    Jason0810M 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
    Srihari.molaka 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
    Jason0810M 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
    Jason0810M 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
    André Arnaud de Cal... 292,074 Super User 2025 Season 1 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
    Waed Ayyad 7,245 Super User 2025 Season 1 on at
    Adding default dimensions to form ProcCategoryHierarchyManagement
     Hi,
     
    Are you sure you enabed it on this class LedgerDefaultDimensionEntryController ?
     
     
    Regards,
    Waed
  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 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
    Mohit Rampal 12,554 Super User 2024 Season 1 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
    Anton Venter 19,493 Super User 2025 Season 1 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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,074 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,900 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans