I have a scenario likes Sales List. I store few types of records in a table. When I run the Lookup function at diffirent form, I want to show the same lookup form but with diffirent type of records and show/hid some fields. Look at Sales Header table, there are few types of record, Order, Quote,… When you click the lookup button at Sales Order form, a list of Sales Order is displayed. And when you do so at Sales Quote form, a list of Sales Quote is displayed. Actually, it is the same lookup form – Sales List. How to do that? I cannot find any code or properties to filter the records. I also want to show/hid some fields. Thanks in advance. [:)]
Hi Sales List is lookupform od Sales Header table. It displays records in ‘Rec’. In Sales Order Form, ‘source table view’ is set to filter on document type = order. Thats why rec contains only order records. And when you click on the list button, you get to see the records in Rec (filtered for order) Jo
Hi, Meenal Madavi, thanks! I got it. I also want to hid some fileds. But I cannot find where to put code. Any solution?
Hi, typically positions are OnAfterGetCurrRecord, OnAfterGetRecord but more simple : create a column in your table i.e.: VISIBLE calculate in the on OnOpenForm-Trigger (OnInit) the “VISIBLE” with modifying of the record select a filter like VISIBLE=true
Thanks! I solved it. I check the type of Rec in the OnOpenForm trigger so that I can show/hide some fields accordingly. Don’t need to create extra field.