Office +1 (678) 666-2100
Fax: +1 (678) 666-1997

Search:

Installation and Setup of Field Level and Data Security in NAV 2009 SP1 and 2009 R2

Before starting the installation please review the Best Practices for NAV Easy Security setup

Field Level and Data Security is not a replacement for regular permissions in Microsoft Dynamics NAV but adds additional levels of security. NAV Easy Security or manual editing must be used for dealing with the maintenance of Database Logins, Windows Logins and Roles in standard NAV. Without a proper setup of regular permissions things can be bypassed by an experienced user.

Initial setup of Field Level and Data Security and modification to code is best done from the Classic Client. After the initial setup, all remaining setup can be done from either the RoleTailored or Classic Client.
The standard setup assumes a minimum NAV executable version of 2009 SP1 (6.00.01). If an older version of the executable is used, some functions must be performed manually (exporting and importing objects).
The setup should be performed by a person familiar with form and page design. If the customer is not maintaining or developing their own customizations, a partner should always be performing the implementation of Field Level and Data Security.

Importing Objects



If Easy Security - Logins and Permissions has already been implemented, then the objects will have already been imported. In that case, proceed to Installation and Code Modification.

The objects for NAV Easy Security are all new objects. This simplifies integration with a customized database because objects can be imported without overwriting existing objects. The objects are distributed in 2 files "ES1.xx.xx y.yy.yy.fob" and "ESACC Empty Objects ES1.xx.xx.fob".
The latter should only be imported when initially installing Easy Security, because the application generates code in these objects to accommodate setup and so they should not be overwritten. For future upgrades only the first file should be imported. The version y.yy.yy refers to the executable version used by the customer.

If the MenuSuites used by Easy Security (52 and 1052) are already in use by the customer, additional menuSuites may be imported from the file "ES1.30.09 MenuSuite 51-60 and 1051-1060.fob". Only import one MenuSuite in the range 51-60 and one in 1051-1060. More detailed information is available at this link:

Installing a different MenuSuite

During the import of the objects, a warning may be shown about the code using an older version of NAV (based on hotfixes being applied). This is not a problem because the code is going to be recompiled to ensure the C# code matches the current executable.

After importing the objects, remember to compile all the objects within the filter ES* on the Version List. Some fields in the security tables have different data types between versions of NAV/SQL/Native and will cause a run-time error if not compiled after importing objects.



Language modules are available in Danish, Dutch, English, French, German, Italian, Portuguese and Spanish. To import the language module, filter on the Version List with the filter "ES*" and select all objects, then use Tools, Language Module, Import and select the needed language. Based on a limitation in C/SIDE, it is only possible to import 4-5 additional languages in Easy Security.




Three extra "empty" Codeunits need to be imported from "ESACC Empty Objects ES1.xx.xx.fob" before modification of the objects. These Codeunits will be modified by the code modification process to contain certain functions and lookup data. This will be used when doing modifications in the future or doing setup in other companies for Field Level and Data Security.

Installation and Code Modification



Before starting the installation, export all the objects to an fob-file. This will ensure all changes can be reverted to the state before Field Level and Data Security was installed.

The company where security is installed and maintained should be a new company with limited data for the application. A common setup method would be to create a new "Easy Security" company. If Easy Security - Logins and Permissions has already been implemented, then the security company may have already been created.

After importing the objects, the steps below are required to get Field Level and Data Security installed and set up.

1: Additional permissions must be assigned to all non-Super users for Read to TableData 14123801 to 14123809, 14123817, 14123818 and Execute for Codeunit 14123801, 14123806, 14123811, 14123812 and 14123814. This can be accomplished by adding the permission in the role ALL and BASIC with a standard NAV permission setup.

2: Refresh the MenuSuite to show the Easy Security Menu Group. This can be done by closing and opening the database.

3: In the Easy Security company, click on the "Field Level and Data Security Setup", check the field "Install Allowed" and enter new file name in "Source Code File Name". Objects will be exported to this file. Only one company in the database can have Install Allowed checked as this company contains the security setup and is considered the "parent" company for FLADS.
The "Source Code File Name" must be different every time or an error will occur: "File already exists"

4. If only the RoleTailored Client will be used, uncheck Modify Forms. If only the Classic Client will be used, uncheck Modify Pages. For both clients leave both options checked.









5: Use the "Functions, Initial Source Code Analysis" to start the Source Code Analysis. This process will export all the licensed objects to the file specified in Source Code File Name and then perform a source code analysis. If the customer's license does not contain module 7200 (Application Builder), a partner developer license must be used. If Easy Security - Logins and Permissions has already been implemented, the resulting Source Code Analysis can be used to reduce the implementation time.

6: Open the "Source Table Setup" and enter the tables for which field level security is required. It is better to start out with a few tables like 15 (G/L Account), 17 (G/L Entry), 18 (Customer), 27 (Item), 36 (Sales Header) and 37 (Sales Line) because it is very easy to add additional tables later and the installation can be tested within a few minutes after finishing the install. Just remember that if tables are added later, a partner developer license will be required to export objects and to execute Implement Changes in Code. For further information, please see the following link:

How To Add Additional Tables to Source Table Setup in Field Level, Actions and Data Security





7: Open the Field Level and Data Security Setup and enter a new/different file name in "Source Code File Name". The same name cannot be reused unless the existing file is deleted or removed.

8: From the Field Level and Data Security Setup click on "Functions, Implement Changes in Code". This process will export the objects specified in Source Table Setup and the related Forms/Pages, apply the necessary code changes to forms and/or pages and write the resulting object changes to the "-out" file specified under Output File Name. Only those objects will be modified. When the processing has finished, the following prompt appears:



After importing the objects they must be compiled.


9: Open the Object Designer and filter on object types Form, Page and Codeunit (F|P|C). Filter on Compiled = No, Date = today. Select all objects and compile.









Sometimes objects cannot be compiled based on code being wrong even if the object was originally compiled. Consult a programmer to figure out what the problem is. Field Level and Data Security should not create any errors in the code.


10: Field Level and Data Security has now been installed and the regular data setup from this point forward can be done from the RoleTailored or Classic Client. The partner license is not required after this portion of the setup is completed. If additional tables need to be setup later, only steps 6-9 need be repeated but performing a complete install will not cause a problem. Only objects actually changed compared to the original source code will be in the output of the re-install process. This ensures as few objects as possible get modified.

The Codeunits 14123811 ES FLADS Get Editable, 14123812 ES FLADS Set Filters and 14123813 ES FLADS Lookup Data should not be replaced at any time with the original objects. These Codeunits contain code and data that is used by the Field Level and Data Security install engine. When moving objects from a test system to a live system, the 3 codeunits must also be included.

The codeunit 14123814 ES Dynamic Filter Customize is intended for customization of the Dynamic Filters by the customer or partner. This codeunit should not be replaced in future updates of the Easy Security objects.

Un-installing Field Level and Data Security



The code changes done by Field Level and Data Security can be uninstalled at any time. There normally should not be a reason to uninstall Field Level and Data Security during normal programming, but sometimes is it easier for programmers to work without other modifications and it can be done. Installation of Field Level and Data Security will always produce the same result with only the Date and Time of the object being changed.

To uninstall follow the steps below.

1: Open the Field Level and Data Security Setup and enter a new file name in "Source Code File Name" to save the original text file with all the objects.






2: From the Field Level and Data Security Setup click on "Functions, Delete Changes in Code". It is suggested to run the removal process on all objects. This is to ensure that even if the Source Table Setup was deleted the code is still removed properly. If the data is correct, only the modified objects can be exported to speed up the process.

3: When the processing has finished the objects must be compiled. Open the Object Designer, filter on object types Form, Page and Codeunit (F|P|C). Filter on Compiled = No, Date = today. Select all objects and compile.


Sometimes objects cannot be compiled based on code being wrong even if the object was originally compiled. Consult a programmer to figure out what the problem is.
Field Level and Data Security should not create any errors in the code.
All the code changes have now been removed and only Date and Time should be changed in the objects.



Like   Don't Like

© 2017 Mergetool.com. All rights reserved.



Related resources

Download software from Mergetool.com