Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to show an error message

(0) ShareShare
ReportReport
Posted on by 130

hi friends,

i am a biginner in axapta.

i would like to show  an error message on date field if i entered date greater than system date.

anybody please help me to do this.

Regards,

nice johny

*This post is locked for comments

  • Nice Johny Profile Picture
    Nice Johny 130 on at
    Re: How to show an error message

    Sorry,I'll try to make my questions perfect.

    Anyway i got the  answer for my question, I used validate Field() method.

    Thanks for your help.

    Regard,

    Nice Johny

  • Martin Dráb Profile Picture
    Martin Dráb 231,305 Most Valuable Professional on at
    Re: How to show an error message

    Sorry, you mentioned that you're writing a validation, but I didn't know that the validation part is unlear too. The only question given was "How to show an error message".

    There is no single answer for the validation - you can use table's validateField() method, or validateWrite() if you want to show the message when saving the record, or FormControl.validate for unbound field, RunBase.validate() for RunBase dialogs and so on...

  • Nice Johny Profile Picture
    Nice Johny 130 on at
    Re: How to show an error message

    Hello Martin

    Thanks for your support. actually i asked for not only to show an error message, and also for to validate my entry. now i got the answer.

    anyway once again i am thanking you. i expect more help for me to go ahead.

    Regards ,

    Nice Johny

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 231,305 Most Valuable Professional on at
    Re: How to show an error message

    To show a message in infolog, use methods error(), warning() and info() - e.g. error("Something is wrong") or warning("@SYS116847"). You may also need strFmt() to format the string.

    If you want to throw an exception, simply put "throw" before error(), e.g. throw error("@SYS84785").

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…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans