Disable Show/Hide Column mouse function

Prototype1Prototype1 Member Posts: 37
Hi all,
I have use the CurrForm.Editable := False code to lock the Sales Quote Form to our Reps (based on User Setup). How do I disable the Show/Hide column Function available with right click on the mouse?....I want to hide some of the cost fields on the sales lines from them and this function allows them to change the screen to show this information.

Thanks

Tim

Comments

  • AlbertvhAlbertvh Member Posts: 516
    Hi Tim,
    You could add a field to the user setup table and in the OnFormat triggers of each field add this code
    CurrForm.FieldName.VISIBLE := UserSetup."Allow View Data";
    


    Hope this helps

    Albert
  • Prototype1Prototype1 Member Posts: 37
    Thanks for the reply,
    I put similar code in OnOpenForm of Form 95, and this blanked the required column from display, but the users can still put it back using the show coulmn mouse function.
    Any other thoughts?

    Thanks

    Tim
  • matttraxmatttrax Member Posts: 2,309
    You're basically talking about field level security, which NAV does not support. There are add-ons you can purchase, but it's not too hard to develop yourself if you just want it for a few fields.

    Change the text in the OnFormat trigger in the field of the form to '***' if they don't have permission.
    Disable the Zoom feature in security.
    Make sure it's not editable.

    They'll still be able to show the column, but won't be able to see the value.
  • Prototype1Prototype1 Member Posts: 37
    OK Thanks. I'll give it a try.
Sign In or Register to comment.