Technical description
The preferences are stored in a table with a combination of User ID and a code that represents the setting. The settings are handled in functions that are the members of the function.
To test if a user has not disabled something, simply use the following code:
IsGettingStartedVisible() : Boolean EXIT(NOT MiniUserRemovedInstructions.GET(USERID,GetGettingStartedCode));
If a user wants to disable a feature, the DisableInstruction
function can be used:
DisableInstruction(InstrCode : Code[20]) IF NOT MiniUserRemovedInstructions.GET(USERID,InstrCode) THEN BEGIN MiniUserRemovedInstructions.INIT; MiniUserRemovedInstructions."User ID" := USERID; MiniUserRemovedInstructions."Instruction Code" := InstrCode; MiniUserRemovedInstructions.INSERT; END;
Dismissible dialog
To allow a user to dismiss a message, a STRMENU should be implemented as the following:
ShowCreateLineInstruction(ItemNo : Code[20]) IF (ItemNo = '') AND GUIALLOWED...