Filtering a lookup menu by customizing the SQL query

In this video tutorial, we'll show you how to filter the contents of the drop down menu for a lookup field. In this example, we want to stop users from adding discontinued products in an order, so we'll write an SQL query that hides discontinued products from the product lookup field. If you know a little SQL, you'll find this tutorial easy to follow.