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 :
Microsoft Dynamics AX (Archived)

Mandatory Field Message

(0) ShareShare
ReportReport
Posted on by

Dear Team,

I want to know From where the info message will come if i am not filling the mandatory fields in a form.

For example, the following is the message i got when i did not fill the mandatory field:

Info.JPG

The above message i am interested to know from where this message comes.

Thanks in advance.

Suresh,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Fx Profile Picture
    425 on at

    Hi Suresh, 

    I'm not able to see your picture, could you re-post it please? 

    Regarding your question, you have multiple possibility to set a field as mandatory. 

    • Directly on the form control by setting the property Mandatory to Yes
    • On the table, you also have a mandatory property at field level
    • By code, in the validateWrite method of the table, or anywhere in the code where you work with records ;

    Not sure, but the table index fields can also trigger this kind of error message

    Regards

    FX

  • Community Member Profile Picture
    on at

    Hi François-Xavier VACCARO,

              Thanks for your replay, but I'm not asking to set mandatory. if data is null in field when creating record,the info will show some warning, from where this warning is return.

    Suresh,

  • Rati Sharabidze Profile Picture
    612 on at

    Hi Suresh,

    What you can do is to find the label of that text in the label editor and then find it in classes.

    Hint: Probably the text to search will be like "Field '%1' must be filled".

    Best regards

  • Verified answer
    krishna.rao@dax Profile Picture
    3,006 on at

    This is invoking from 'Classes\Info\add'

    If  you place break point in 'Classes\Info\add'  , you may find.                                                      

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    The message is coming from the AX kernel, so you will not be able to see where exactly it is coming from.

    The sequence is the following for this event:

    - Check field properties for Mandatory flag, kernel raises error if it is not populated on save

    - Check formdatasource field-level methods, raise either X++ or kernel error

    - Check validate and validateField methods for custom validation, AX X++ raises error based on custom rules

    When the error is raised, the kernel will call Info.add() as mentioned above, so you could trap if it is coming straight from our code. If not, then it is coming from kernel due to field properties set.

  • Community Member Profile Picture
    on at

    Thanks Krishna and Vilmos.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans