Kbase P7786: Dynamics. How to stop the DynBrowser from asking if it shoul
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/12/2003 |
|
Status: Unverified
GOAL:
Dynamics: How to stop the DynBrowser from asking if it should save the current record.
FACT(s) (Environment):
Dynamics 1.1ASP3
CAUSE:
We have one updatable field/column in the browser, but we do not want the browser ask if it should save the value in the record - we want it to save it automatically. I have looked at the code, and the question dialog pops up in the row-leave trigger of the browse (e.g. adm2/brsleave.i). I guess my question is: what's the best way of overriding this functionality? We do not want every browser to work this way.
FIX:
This is a possible workaround for this issue.
The dialog-box containing the dynBrowser starts a super-procedure for
the browser:
PROCEDURE initializeObject :
/* Code placed here will execute PRIOR to standard behavior. */
RUN SUPER.
/* Code placed here will execute AFTER standard behavior. */
RUN start-super-proc IN h_dynbrowser-2 ("oe/ebmolbrowsesuper.p").
END PROCEDURE.
Within this super-proc there is a override for the showMessage function:
FUNCTION showMessage RETURNS LOGICAL
( ipMessage AS CHAR ) :
DEF VAR l AS LOGICAL NO-UNDO.
IF ENTRY(1, ipMessage) = "7" THEN
l = YES.
ELSE
l = SUPER(ipMessage).
RETURN l. /* Function return value. */
END FUNCTION.
Thus, any message with number "7" will be discarded.