Modifications

Along with basic development functions, the object explorer allows you to edit C/AL code of objects and change their properties; you can also use the object explorer to edit data in tables and view table properties.

Editing C/AL Code

From the object explorer, you can view and edit C/AL code of a selected object, both in Microsoft Dynamics NAV and in an external editor. To be able to edit code in an external editor, ensure that you provide a path to the external editor executable in the Object Manager Setup.

Editing with the Object Manager Editor

To edit the code of an object using the built-in C/AL editor of OMA, select the needed object and then click Code in the ribbon.

C/AL Editor
C/AL Editor


Use the C/AL History Lines window that appears as follows:
  • Click the Code field on a line and modify code as needed.
  • Click New Line on the ribbon to add a line of code above the currently selected line.
  • Place check marks in the BreakpointDebugger group in the ribbon to debug code.
  • Use the Edit group in the ribbon to save, undo, or refresh modifications. Additionally, you can switch to editing code in the external editor by clicking Edit in External Editor in the ribbon.

Editing with Navgate

When you choose Navgate as editor in the Object Manager Setup the following editor will be used. Navgate offers a syntax colored environment with IntelliSense, Code Completion, Parameter Info and Code Snippets. See the manual of Navgate for more information.

Navgate Editor
Navgate Editor

Editing in External Editor

To edit the code of one or more objects in an external editor, perform the following steps:
  1. Select the object(s) in question and then click Edit in External Editor in the ribbon. The program will prompt you to confirm exporting the code of the selected object(s) to a text file. The filename format specified in the Setup is used. So if your editor allows color syntaxing you could map that with your own file extension like TAB3.cal
  2. The program will create the text file in the working directory that you define in Object Manager Setup; the file will then be opened in the external editor.

    Edit Object in External Editor
    Edit Object in External Editor
  3. When done editing, close the external editor and return to Microsoft Dynamics NAV. Use the Edit Objects dialog window to define whether you want to compile the object and/or update its Modified flag and date/time.
  4. Click OK to save the modified object and return to the object designer.

Changing Object Properties

Using the object explorer, you can change the version list, modify the date/time, and update the Modified flag of one or more objects. To change object properties, select the needed object(s) and then click Change Object Properties.

Change Object Properties
Change Object Properties


Click OK to update object properties. In the window that appears, fill in the fields as follows:
Update Version List Select this check box to update the version list of the object in question.
Version List ID Select the version list ID that you want to use for the update.
Highest Version No. This field displays the highest version number in the selected version list.
Action Choose whether to add or remove the selected version list and number to/from the object in question.
New Version No. If you choose to add the version list and number to the object in question, provide the new version number. If you choose to remove the version list and number, you may want to leave the field blank or it will only update the objects that has this version number.
Update Date/Time Select this check box to update the date/time of the object in question.
New Date and New Time Enter the new date and time for the object, respectively.
Update Modified Select this check box to update the Modified flag of the object in question.
New Modified Use this field to define the state of the Modified flag of the object in question after the update.
Assign Mods. to Project Select this check box to have the program record the current changes as modifications and prompt you to assign them to a project.

Working with Tables

When working on table objects in the object explorer, you can view the summary of the table properties and properties of its fields, and you can modify data in the table, with or without validation. View Table Information To view information about the fields of a table (primary keys, field captions and classes, field options, and relations to fields in other tables), select the needed table in the object explorer and then click View Table Info on the Table tab of the ribbon.

Table Info
Table Info


The information presented in the window is for reference purpose only. You cannot modify any values. The View Table Info that appears shows the following information:
  • General table information (same as on the object line in the object explorer)
    • Version list
    • Date/time
    • Compiled flags
  • List of all table fields and their characteristics:
    • Primary key fields in bold
    • Field number, name, and caption
    • Field type and class
    • Enabled flag
    • Option values, if applicable
    • Relation to a field in another table, if any

Show Table Data

To show data in a table, select the table in the object explorer and then click Run on the Actions tab of the ribbon. In the window that appears, you can browse records stored in the current table and edit field values similarly to running a table object in the object designer. Additionally, the window offers the following possibilities:
  • Changing column layout.
    Use the Process group in the ribbon to change how data is displayed:
    • Click Hide All Columns to only display the values in the currently selected field.
    • Click Show All Columns to view all fields.
    • Click Select Columns to choose which fields you want displayed.
  • Exporting table data. Click Export on the on the Actions tab of the ribbon and then click the appropriate item to export data stored in the current table to either of the following file formats:
    • CSV
    • TAB delimited
    • FAB
    • XML
    • JSON

    The FAB format can be used to import the data in another Object Manager database.

    Export Table Data
    Export Table Data
  • Viewing data by company. Use the Company Name field above the lines to view data that is stored in the current table in a different company in your database.
  • Update BLOB-fields. If blob fields are present in the table options will be added to the ribbon to up- and download the content of the BLOB fields

    Update BLOB Fields
    Update BLOB Fields
  • Edit Table Data

    Similar to the Show Table data you can Edit Table Data on the Actions tab of the ribbon. Beside the functionality described in the Show Table Data section here above this window has the ability to edit fields and that are non editable and skip the field and table triggers so validation is disabled.

    Edit Data without Validation
    Edit Data without Validation