How to: Redesign Journal and Worksheet Batches

Microsoft Dynamics Nav 2009

In the RoleTailored client, the navigation principle that a user must always be able to move from a list place to a card also applies to journals and worksheets. The user navigates from a list of several batches to a specific journal or worksheet. This method is not required in the Classic client, so you must modify C/AL code prior to transformation.

The following figure shows an example of a journal form that was redesigned in Microsoft Dynamics NAV 2009 so that it can be transformed to a page. This form, form 251, General Journal Batches, contains a list of batches of Cash Receipt journals.

Dd338622.Local_-1787994975_nav_plat_form251generaljournalbatches(en-us,NAV.60).gif

To follow the navigation principle in the RoleTailored client, you must redesign your journal and worksheet batches.

To redesign journal and worksheet batches

  1. Click the Tools menu, and then click Object Designer.

  2. In Object Designer, select Table, select the table on which the journal form that you want to redesign is based, and then click Design.

  3. In Table Designer, add the following fields to the table:

    • Template Type (Data type: Option)

    • Recurring (Data type: Boolean)

    For an example of a table with these fields, see Table 232, Gen. Journal Batch.

  4. In Object Designer, select Codeunit, and then select the journal management (…JnlManagement) codeunit for the journal or worksheet batch that you are redesigning. Add the following methods to the codeunit:

    • PROCEDURE TemplateSelectionFromBatch

    • PROCEDURE OpenJnl

    For examples of these procedures, see Codeunit 230, GenJnlManagement.

  5. In the journal management codeunit, add an If OpenFromBatch condition to the TemplateSelection procedure. For an example of the If OpenFromBatch condition, see the TemplateSelection procedure in Codeunit 230

  6. In Object Designer, select Form, select the journal or worksheet batch form that you are redesigning, and then click Design.

  7. In Form Designer, add a command button labeled Edit Journal to the journal batch form. When you click the new command button, the journal opens. For more information about how to add a command button, see How to: Create Command Buttons.

    For an example, see Form 251, General Journal Batches.

  8. In Form Designer, click the View menu, and then select C/AL Code. In the C/AL Editor, add code to the OnInit and OnOpenForm triggers. For examples of the code to add, see Form 251, General Journal Batches.

  9. In Object Designer, select Form, select the journal form (not the journal batch form), and then click Design. Click the View menu, and then select C/AL Code.

  10. In the C/AL Editor, add code to the OnOpenForm trigger. The added code is contained within the OpenFromBatch condition.

    For an example of the code on the OnOpenForm trigger, see Form 39, General Journal.

Community Additions

ADD
Show: