SetSaveWarningFilter function
Syntax
SetSaveWarningFilter(enable_or_disable)
Description
Use the SetSaveWarningFilter function to suppress save warning irrespective of whether the component level flag (indicating whether the component is changed) is set or not. If you use this function, the component processor ignores the component level flag value and lets the user to navigate away from the component without issuing any save warning.
Note:
After the updates are completed, ensure to call SetSaveWarningFilter(False) to resume the save warning flag.
Parameters
| Parameter | Description |
|---|---|
|
enable_or_disable |
Specifies a Boolean value indicating whether to issue save warning to a user. If True, the component processor ignores the flag and save warning is not issued; if False, component processor issues save warning. |
Returns
None.
Example
In this example, the function temporarily disables save warning and then enables save warning.
method LoadGroupletSetupGrid
/+ &p_rwCurrentRow as Row +/
/* Disabling save warning */
SetSaveWarningFilter( True);
If &p_rwCurrentRow.PTGPLT_WORK.PTGPLT_DT_DROPDOWN.Value = "All" Then
&m_rsPTGPLTSetup.Flush();
GetLevel0().Select(Scroll.PTPPB_GROUPLET, Record.PTPPB_GROUPLET);
Else
&m_rsPTGPLTSetup.Flush();
GetLevel0().Select(Scroll.PTPPB_GROUPLET, Record.PTPPB_GROUPLET, "Where PTPPB_DATATYPE_ID = :1", &p_rwCurrentRow.PTGPLT_WORK.PTGPLT_DT_DROPDOWN.Value);
End-If;
/* Re-enabling save warning */
SetSaveWarningFilter( False);
end-method;