Search:

Installation and Setup of Field Level and Data Security on 2009 and earlier

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 many things can be bypassed by an experienced user.

In older versions of the executable, the function to import and export objects from code is not present, so those functions must be performed manually.
The setup should be performed by a person familiar with form 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

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 needs 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 a 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 method 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, 14123811 to 14123813, 14123817 to 14123819 and Execute for Codeunit 14123801, 14123805, 14123806, 14123811, 14123812 and 14123814. This can be accomplished by adding the permission in the role ALL 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 Field Level and Data Security menu, select Setup, Field Level and Data Security Setup, then check the field "Install Allowed". 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 Field Level and Data Security.

4. Uncheck the Modify Pages checkbox since this option applies only to the RoleTailored Client in NAV 2009 and 2013.



5: Since import/export from code is not available in pre-2009 versions, all tables and forms must be exported manually. This will require a partner developer license. From Object Designer, filter on tables and forms.



6. Select File, Export and save the objects to a location on your hard drive or a network drive in text format.



7. After the export has completed, return to Field Level and Data Security Setup and enter the text file name in the Source Code File Name. Use the "Functions, Get Relations from Source Code" to start the Source Code Analysis. If Easy Security - Logins and Permissions has already been implemented, the resulting Source Code Analysis can be used to reduce the implementation time.



8: 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





9: From the Field Level and Data Security Setup click on "Functions, Implement Changes in Code (no Export of Objects)". This process will use the previously exported text file to apply the necessary code changes to forms based on the tables in Source Table Setup and write the resulting object changes to the "-out" file specified under Output File Name. Only those objects will be modified.

10. From Object Designer, import the "-out" file specified in Output File Name in Field Level and Data Security Setup





After importing the objects they must be compiled.

11: Open the Object Designer and filter on object types Form or Codeunit (Form|Codeunit). 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.


Field Level and Data Security has now been installed. The partner license is not required after this portion of the setup is completed. If additional tables need to be setup later, only steps 8-11 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: Export all objects to a fob file before continuing so that changes may easily be reverted.



2: From the Field Level and Data Security Setup click on "Functions, Delete Changes in Code (no Export of Objects)". 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. This must be done manually from Object Designer as in the previous steps. Be sure to change the Source Code File Name above as needed.

3: When the processing has finished the objects must be compiled. Open the Object Designer, filter on object types Form or Codeunit (Form|Codeunit). 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

© 2024 Mergetool.com. All rights reserved.



Related resources

Download software from Mergetool.com