Announcements
No record found.
Hi all,
I have a checkbox and a lookup field, when the checkbox is yes, the user is not allowed to type in the lookup field directly (like entering the data manually in the field) instead they should choose the data from lookup and if they typed it manually it needs to throw error.
how to do in X++ ?
Thanks
Hi,
What are you trying to achieve here? You should not stop manual entry like that, I am assuming what you need is to validate if the value is correct which needs to be done in the Validate method and not lookup.
Hi
Why don't you have one checkbox field , one Lookup field (reference group), and one textbox.
Based on the checkbox you disable and hide the control you want.
Regards,
M
Just put your code in validateField() or validateWrite() method of the table.
Whether the user selected "foo" from the lookup or typed "foo" should not make a difference and you should not try to block one of them.
Hi WayToD365FO,
If you have a lookup field, you will always need to choose values from the lookup values. Correct? I would think that this field is linked to a master table and the values selected in the field would be validated.
Hi WaytoD365FO,
For what reason do you have this requirement? Why should a person choose from the lookup if typing could be in some cases be done quicker? If there is a table relation, there is a default validation if the value exists anyway.
Blocking the lookup control for manual entry, but allowing the lookup is not possible unless you create a separate button for the lookup.
A lookup form is just an assistance for users who don't know the value to use. But if they want to paste a value copied from another place, or even type it manually, they should be able to do it. Another common use case is typing just a part of value and then opening a lookup form with a filtered list of values.
Your design would prevent all these things, making your system much less useful.
Thanks for your replay to all,
sorry for delay replay.... give us a your solution is that only for two status based not a all lookup and
i give it to "Lookup only property" its an impact all lookup what could be causes and resolution ?
unfortunately I don't understand your latest message. Could you try to describe your question in a clearer way? Thanks!
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 284 Super User 2026 Season 2
Aayush Tiwari 213
Subra 200 Super User 2026 Season 2