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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Dimension assign validate

(0) ShareShare
ReportReport
Posted on by 50

Hi, 

I did customization, that on Dimension page (536) are checkbox, "Customer". 

The goal is to check, before closing the Customer Card, that all Dimension Codes (marked with a checkbox) have been assigned to the Customer.

How to do this? Any code examples, used on other pages? 

I have the same question (0)
  • Tony00001 Profile Picture
    50 on at

    Any ideas?

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    I can give you the pseudo code for doing this.

    In the on before close page event for the page in question you need to take the dimension set id from the customer table and pass it on to the DimensionManagement Codeunit to have returned a dimension set.

    Compare that dimension set to the dimensions you have marked mandatory in the dimension table.

    Or use the standard functionality.

    Use a template when creating customer.

    Define default dimensions as a part of that template and make the dimensions you want mandatory in the default dimension card.

    Then you will be stopped the first time you try to post anything that does not comply.

    Happy coding!

    Please share your code if you run into any problems then we can help you further.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,226

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,047 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,257 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans