Consultor Eletrônico



Kbase P84194: Dynamics pressing F5 after closing filter window loses foreign field values
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/13/2005
Status: Unverified

FACT(s) (Environment):

Dynamics 2.1A

SYMPTOM(s):

Dynamics pressing F5 after closing filter window loses foreign field values

Using Filter button on a dynamic SDO can cause any foreign field information to be lost. For example on a child SDO smartDatabrowse, if the filter button is used and the subsequent filter window closed, pressing F5 to re-open the query on the child browse displays all records. Thus the foreign field values between the parent SDO and the child browse SDO has been lost.

CAUSE:

This is a known issue being investigated by Development

FIX:

Create a super procedure for the child browse and then trap the 'F5' function key event. This can then be used to refresh the foreign field values. For example, in the child browse initializeObject procedure add:

RUN SUPER.
DEFINE VARIABLE h_SDB AS HANDLE NO-UNDO.
h_SDB = DYNAMIC-FUNCTION('getBrowseHandle':U IN TARGET-PROCEDURE).
ON f5 OF h_SDB PERSISTENT RUN f5Pressed IN TARGET-PROCEDURE.


Then in the same super procedure, define a procedure called f5Pressed with the following code:


DEFINE VARIABLE h_SDO_child AS HANDLE NO-UNDO.
DEFINE VARIABLE h_SDO_parent AS HANDLE NO-UNDO.

{get datasource h_SDO_child}. /* Child SDO */
{get datasource h_SDO_parent h_SDO_child}. /* Parent SDO */

IF VALID-HANDLE(h_SDO_child) THEN
DO:
dynamic-function('openQuery':u IN h_SDO_child).
IF VALID-HANDLE(h_SDO_parent) THEN
DO:
PUBLISH "dataAvailable" FROM h_SDO_parent("DIFFERENT":U).
END.
END.