Kbase P10738: How to set the baseQuery for a SmartDataObject using super p
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/01/2003 |
|
Status: Unverified
GOAL:
How to set the baseQuery for a SmartDataObject using super procedures
GOAL:
BaseQuery property does not work in the SmartDataBrowser super procedure
FACT(s) (Environment):
Dynamics 1.1A
FIX:
BaseQuery property cannot set in the SmartDataBrowser super procedure, it could be set in the Container or SmartDataObject super procedure.
The following code is an example of how to set the baseQuery property for a SmartDataObject.
Create the initializeObject internal procedure for the container super procedure and add the following code:
DEFINE VARIABLE cObjects AS CHARACTER NO-UNDO.
DEFINE VARIABLE hObject AS HANDLE NO-UNDO.
DEFINE VARIABLE i AS INTEGER NO-UNDO.
ASSIGN cObjects = DYNAMIC-FUNCTION('getContainerTarget':U IN TARGET-PROCEDURE).
REPEAT i = 1 TO NUM-ENTRIES(cObjects):
ASSIGN hObject = WIDGET-HANDLE(ENTRY(i, cObjects)).
IF hObject:TYPE = 'PROCEDURE':U
THEN
IF DYNAMIC-FUNCTION('getObjectName' IN hObject) = 'customerfullo':U
THEN
DYNAMIC-FUNCTION('setBaseQuery':U IN hObject,
INPUT "FOR EACH customer NO-LOCK WHERE custnum < 10").
END.
RUN SUPER.
END PROCEDURE.