Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How check value form control

(0) ShareShare
ReportReport
Posted on by

Hi

I have form with fields:

datefrom

dateto

customer account 

salesorder

item

Customer select first dates. If he dont selected dates, customer lookup will dont active. How me check? Thank you

  

*This post is locked for comments

  • Mohammad Raziq Ali Profile Picture
    Mohammad Raziq Ali 2,432 on at
    RE: How check value form control

    Hi,

    Ivan have understood your problem very well. So, follow him as he instructed you with his reply

  • maxhammer Profile Picture
    maxhammer on at
    RE: How check value form control

    thank you!

  • Verified answer
    RE: How check value form control

    If I understood correctly from your description, you want to NOT show the customer lookup unless both dates were specified. Correct?

    If yes, you can override the lookup method and not call super():

    public void lookup()

    {

       if (DateFrom.dateValue() && DateTo.dateValue())

       {

           super();

       }

    }

    Alternatively, you can control the value of the property LookupButton on the CustAccount control on modified() method of DateFrom and DateTo, but I don't like that as much, the LookupButton does not behave very well.

  • Verified answer
    Rachit Profile Picture
    Rachit 4,015 User Group Leader on at
    RE: How check value form control

    Hi,

    You can override the lookup method and put your conditions before the super() call. 

  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: How check value form control

    Do you mean that if there is no value in datefrom and dateto, there won't be any lookup for customer account? If you merely remove the lookup, users still will be able to type in a value. Would it be better if you disable customer account field?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans