Changing the Hyperspace property for a lookup button added with Modifier
It sounds like some word out of Captain Kirk’s vocabulary, but for Dexterity developers Hyperspace is a well known property that allows a Dexterity-based application to run the change script for a push button, i.e., a lookup button, without moving the focus from the currently-selected field. For example, you won’t want the ‘Customer Number’ field on the Customer Maintenance window to execute it’s change script before you have selected a customer from the Customer Lookup window as the lookup button is clicked… that’s what Hyperspace does, it prevents such situations by keeping the focus on the ‘Customer Number’ field until a customer ID is returned from the lookup window into the field.
The problem is, this property is locked down for push button controls added with Modifier, and while you cannot edit the push button change script with Modifier, you may still want to trigger off such controls with Dexterity code. This is pretty common for customizations where you don’t want to create an alternate versions of a GP form, but require a control placed directly on the GP form in order to call your own Dexterity code (see my article Developing Microsoft Dynamics GP hybrid integrating applications).
So, here is the workaround for changing the Hyperspace property of a push button control added with Modifier:
1. Add the push button control to your Modified window. In my example I will be using the sopCustomerItemMnt form. The following illustrates the changes made:
2. Save your modified window and return to Microsoft Dynamics GP. Open the Customization Maintenance window and locate the sopCustomerItemMnt. Click the Export button to export the modified window to a package file. The following is the content of exported package file: