AnsweredAssumed Answered

Looping Through Related Records Without Using/Showing 2nd Window

Question asked by johnhorner on Feb 19, 2011
Latest reply on Feb 19, 2011 by johnhorner

Title

Looping Through Related Records Without Using/Showing 2nd Window

Post

There are several instances in my database where i need to update a complete set of related records.

For example, on an invoicing layout, i have a global search field for products (INVOICES::g_ProductLookup) to allow users to search for any products in the database whose name, product code, or description "match" the contents of this field.  An "on object save" script trigger opens a new window, goes to a blank layout based on the products table, and performs a find on the name, product code, and description fields.  A looping routine marks any found records as "found" (by setting PRODUCTS_Found field to "1").  The script closes the window and you are back on the invoicing layout where you started and a portal displays all the found product records.  This all happens fairly quickly (depending on the number of found records), but even so you can still see the products window (whose window size is set to zero) flash in the upper left corner of the already open invoices window.

I have 2 related questions:

Is there a better way to do this that does not require opening a second window?

If not, is there a way to hide the second window while this type of script runs?

Outcomes