Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Restrict entry of part...
Finance forum
Suggested answer

Restrict entry of particular financial dimension on dialog form

Posted on by 283
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 283 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 228,683 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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,570 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,683 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans