Can I disable the "Zoom" key for one form - or all

Can I insert C/AL code to selectively restricted the use of the Ctl-F8 "Zoom" key? I want to restrict certain users from using Ctl-F8 key a specific form.

Notwithstanding that, can I restrict a user from using the Ctl-F8 function key on ALL forms?

Thx

Ron
  • As for completely preventing a User from using the Zoom functionality, this is possible. It is a matter of permissions.

    There is a System object - 5330 Tools, Zoom - which controls the access of User Groups to this tool.
    If a User does not belong to a Role with permission to access this Object, he will not be able to use the Zoom window - it will be disabled.


    On your original question, there is no way to deny Zoom access on a selective basis. It is an Application wide setting controled only by permissions.
    Unless there is someone really clever [;)] out there who can show us how... [:0]
  • Actually Nelson, it can be done (so does that mean I am someone really clever[:I]), but it is not straight forward. Also it is table dependant, not form, since the Ctrl+F8 goes straight to the Table with no reference to the Form.

    All you need is a field in the table with a caption class. When you zoom on the table, a call is made to codeunit 1, and you can add code in here to prevent the field from displaying.

    I suggest to create your own field, "CheckForF8" and modify Codeunit 1
    CaptionClassTranslate(Language : Integer;CaptionExpr : Text[80]) : Text[80]
    CommaPosition := STRPOS(CaptionExpr,',');
    IF (CommaPosition > 0) THEN BEGIN
    CaptionArea := COPYSTR(CaptionExpr,1,CommaPosition - 1);
    CaptionRef := COPYSTR(CaptionExpr,CommaPosition + 1);
    CASE CaptionArea OF
    '1' : EXIT(DimCaptionClassTranslate(Language,CaptionRef));
    '2' : EXIT(VATCaptionClassTranslate(Language,CaptionRef));
    //>> Start Zoom check
    '50000' : RunCtrlF8Check(CaptionRef);
    END;
    END;
    EXIT('');


    Then just pass a paramater like '50000,27' to the CaptiionClassParamater. THe code will be called on Zoom, or Table Run from the designer. You can prevent a super user from viewing a table like this.

    THis is really a Tips and Tricks Item, and you can use it for lots of things, like high level table security.

    Hope it helps, let me know.
  • So, David, where can I send you the cigar?
  • Cigar ... Lets make it a bottle of fine Porto, and we can share it watching a sun set one evening [:)]
  • I'm afraid I'm not a wine guy myself - I prefer Weissbier...[:D]
    But anyway, it's a deal if you ever come visit.

    Humm, this reminds me I haven't yet voted on the beer thread!!! [8D]
  • David,

    Can you explain further how to implement this please?

    Thanks.
  • On a form you can achieve this by adding a Menu Button Item with Ctrl+F8 as ShortCutKey. If you don't assign any Action or Code to that menu item nothing will happen when Ctrl+F8 is pressed.

    Am I clever too? [:D]
  • quote:
    On a form you can achieve this by adding a Menu Button Item with Ctrl+F8 as ShortCutKey. If you don't assign any Action or Code to that menu item nothing will happen when Ctrl+F8 is pressed.

    Am I clever too? [:D]

    Originally posted by PeterD - 2005 Nov 02 :  16:17:40



    You are a genius [:D]

    Only thing is, this disables it for all users. Then youl'd have to disable the button for users that are allowed to zoom.[:I]

    (Groeten aan Tino[8D])
  • Lloyd,

    What is the part in David's explanation that you do not understand?
  • quote:
    On a form you can achieve this by adding a Menu Button Item with Ctrl+F8 as ShortCutKey. If you don't assign any Action or Code to that menu item nothing will happen when Ctrl+F8 is pressed.

    Am I clever too? [:D]

    Originally posted by PeterD - 2005 Nov 02 :  16:17:40



    Uh. It could work. If users can't work with the menu. [:D] You can zoom if you go to Extra, Zoom in the menu...
Related
Recommended