Always use a Select button on lookup windows. The Select button should return a value to the original window using the return statement. The following example script returns a value from the Leads lookup window.
if empty('Lead ID' of window Lead_Lookup_Scroll) then warning "Please select a record first."; else return 'Lead ID' of window Lead_Lookup_Scroll; close form IG_Lead_Lookup; end if;
A lookup window should also have a Cancel button that simply closes the window.