Search:

How To Delete Code Changes

Overview: For developing complex customizations or for upgrading objects, it may be desirable to temporarily remove the Easy Security code changes. The Delete Code Changes function allows for the removal of code without impacting the data. Once the development project has been completed, the function Implement Changes in Code can be run to add the code back into forms and pages.

A partner/developer license is required for this process due to the export/import of objects in text format.


1) As always, it is a good idea to backup forms and pages before any code changes take place.

2) Export all Forms and Pages to a text file from Object Designer



Note: The steps can be done in either client. However, the automatic export/import of objects is available only in NAV 2009 SP1 and R2, and only in the Classic Client. Therefore, in NAV 2009 it is easier to execute this step from the Classic Client, because the Delete Changes in Code function does the export, code changes and import of objects automatically.

The manual method for other NAV versions and for RTC will be explained below as well.

NAV 2009 SP1 and R2 only, Classic Client method

3) In the Easy Security company, go to Field Level and Data Security Setup. Enter a new file name in Source Code File name. The process will export the necessary objects to this file, delete the code changes in the "-out" file which defaults into the Output File Name, and then it will automatically import those changes.



4) Select Functions, Delete Changes in Code



5) Answer Yes when prompted to import objects



6) The modified objects now need to be compiled. In Object Designer filter on object types Form, Page and Codeunit (F|P|C). Filter on Compiled = No, Date = today. Select all objects and compile.
The objects have now been returned to the state prior to installing Field Level and Data Security. To re-implement the code changes at any time, please see the following article.

How To Implement Changes in Code

Note: In pre-2009 versions of NAV, you will use Classic Client but with the manual method described below. Use the "Delete Changes in Code (No Export of Objects)" option under the Advanced menu.

RTC manual method

3) In Field Level and Data Security Setup, enter the file name from step 2 in Source Code File Name and select Delete Changes in Code (No Export of Objects). The Output File Name is defaulted from Source File Name and a "-out" suffix is added. This is the file where the code changes will be written.



A message will appear when the process has completed to show the number of objects actually modified.



4) The output file will now need to be imported. In Object Designer select File/Import and enter the Output File Name specified earlier.



5) The modified objects now need to be compiled. In Object Designer filter on object types Form, Page and Codeunit (F|P|C). Filter on Compiled = No, Date = today. Select all objects and compile.

The objects have now been returned to the state prior to installing Field Level and Data Security. To re-implement the code changes at any time, please see the following article.

How To Implement Changes in Code



Like   Don't Like

© 2024 Mergetool.com. All rights reserved.



Related resources

Download software from Mergetool.com