Kbase P18486: How to disable a field in a SmartDataViewer when the Update button is pressed
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
Status: Verified
GOAL:
How to disable a field in a SmartDataViewer when the Update button is pressed
GOAL:
How to disable or enable field when an Add or Update record operation starts in the ADM2
GOAL:
Using the enableFields procedure to enable/disable fields when an update record starts
FACT(s) (Environment):
Progress 9.1x
FIX:
If some field should be enabled or disabled according to the Update mode, the following code could be added in the enableFields procedure in the SmartDataViewer:
/* Code placed here will execute PRIOR to standard behavior. */
/*DYNAMIC-FUNCTION('getNewRecord':U) function values:
Add button pressed = 'Add'
Update button pressed = 'No'
Copy button pressed = 'Copy'*/
IF DYNAMIC-FUNCTION('getNewRecord':U) = 'No':U THEN
ASSIGN RowObject.Phone:READ-ONLY IN FRAME {&FRAME-NAME} = TRUE.
ELSE
ASSIGN RowObject.Phone:READ-ONLY IN FRAME {&FRAME-NAME} = FALSE.
RUN SUPER.