Skip to main content

Notifications

Announcements

No record found.

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

How to customise DimLookup (Dimension lookup) to only allow certain values for a User

(0) ShareShare
ReportReport
Posted on by 133
I have a requirement where the financial dimension lookup should only display specific values as granted to the User.  This needs to happen on all forms where the financial dimension can be edited.
I have a table containing for each user a list of Dimensions that that user is allowed to select when creating records and editing the financial dimension.  It is only for 1 specific dimension value.
How can I extend the DimLookup to filter and only show those valid Dimension values to be selected.
Also, if the user were to type in the value and not select the value from the lookup, is there a way that I can validate without having to do the validation on every form.
Any help will greatly be appreciated.
  • Suggested answer
    Kevin Xia Profile Picture
    Kevin Xia Microsoft Employee on at
    How to customise DimLookup (Dimension lookup) to only allow certain values for a User
    Hi,

    You can follow these steps:

    1. Create a table that contains the list of dimensions that each user is allowed to select. This table should have a relationship with the User table.

    2. Extend the DimLookup form control to add custom filtering logic. You can do this by extending the form where the DimLookup is used and adding your custom code.

    3. In your custom code, retrieve the currently logged-in user and fetch the list of allowed dimension values based on their permissions.

    4. Modify the query used by the DimLookup to include a filter using the list of allowed dimension values retrieved in step 3. This will ensure that only valid dimension values are displayed in the lookup.

    Additionally, if you want to validate the dimension value entered by the user without relying solely on the lookup selection, you can implement additional validation logic. You can create an event handler or override the validate method on the form to perform the validation based on the allowed dimension values.

    Best regards,
    Kevin

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans