Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Restrict entry of particular financial dimension on dialog form

(1) ShareShare
ReportReport
Posted on by 339
We have a custom dialog form with a control attached to HcmEmployment.DefaultDimension. There are four levels in the financial dimension - the last one being Project. I want the user to enter in the first three as required but I do not want them to enter a value for Project. Can that be achieved through code?  
  • CU29041349-0 Profile Picture
    CU29041349-0 339 on at
    Restrict entry of particular financial dimension on dialog form
    Hi Martin,
    I guess I don't understand how the controller classes manage the individual dimensions. This is what I've glean from HcmDimensionEntryController.
     
    Create MyDimensionEntryController extending LedgerDefaultDimensionEntryController
    Override construct() on MyDimensionEntryController
    Override initialize() on MyDimensionEntryController and copy code from HcmDimensionEntryController. Find my 'Project' DimensionAttribute, removed it from DimensionAttributeSetStorage.
     
    There are other parts of HcmDimensionEntryController which I'm not sure is required such as checking isUserSelectedDimensionsEnabled. 
     
    Thank you. 
     
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,370 Most Valuable Professional on at
    Restrict entry of particular financial dimension on dialog form
    Notice that the Dimension Entry control has a property called Controller Class. You can implement your own class (inheriting from LedgerDefaultDimensionEntryController) and put such logic there. Look at existing controllers to how to do it, e.g. how parmDimensionsToAllowEdit() is used in HcmDimensionEntryController class.

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans