O'Reilly logo

Microsoft Dynamics NAV 2009 Programming Cookbook by Matt Traxinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Field-level security

Field-level security does not exist out-of-the-box in NAV and is not easy to implement. In fact, real field-level security is impossible to implement. This recipe will show you an example of how to quickly create a work around for this type of security model in your system.

Getting ready

Part of the code in this recipe relies on code from the codeunit created in the Checking for user-assigned roles recipe in this chapter.

How to do it...

  1. Create a new table in Object Manager named Field Level Security.
  2. Add the following fields:

    Name

    Type

    Length

    Table No.

    Integer

     

    Field No.

    Integer

     

    Security Type

    Option

     

    Applies To

    Text

    119

    Editable

    Boolean

     

    Visible

    Boolean

     

    Show Text

    Boolean

     
  3. Set the following properties for these ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required