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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
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

  • Martin Dráb Profile Picture
    240,785 Most Valuable Professional on at

    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?

  • Verified answer
    Rachit Profile Picture
    4,015 User Group Leader on at

    Hi,

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

  • Verified answer
    Ivan (Vanya) Kashperuk Profile Picture
    Microsoft Employee on at

    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.

  • maxhammer Profile Picture
    on at

    thank you!

  • Mohammad Raziq Ali Profile Picture
    2,488 on at

    Hi,

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

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans