Skip to main content

Notifications

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

How to make data entity field mandate using x++ code

(0) ShareShare
ReportReport
Posted on by 10

I have a scenario that I need to make a control button and based on that the field on data entity should be mandate.

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,962 Most Valuable Professional on at
    RE: How to make data entity field mandate using x++ code

    Moved from Dynamics AX Forum.

    Look for events with Validating in name, such as onValidatingField or onValidatingWrite.

  • pankaj047 Profile Picture
    pankaj047 10 on at
    RE: How to make data entity field mandate using x++ code

    HI Martin,

    My requirement is " I need a make field mandatory on Data entity in F&O, using x++ code."

    I need to know which event handler I can use or there is some another way to achieve.

  • Martin Dráb Profile Picture
    Martin Dráb 230,962 Most Valuable Professional on at
    RE: How to make data entity field mandate using x++ code

    Do you mean mandatory? In AX 2012 or F&O?

    The form may set a value of parameter field. When you're trying to import the data, you may check whether a field is empty and the parameter requires the field to be populated. If so, you'll fail the validation. Implementation details depends on what your question is about.

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,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans