Na2009 enus devii_05

18
Chapter 5: Integration 5-1 CHAPTER 5: INTEGRATION Objectives The objectives are: Integrate previously created Seminar module features with one another by adding the Navigate feature to pages. Add to the Department Menu so that the Seminar module functionality is accessible in a standard way. Integrate the Navigate feature into the Seminar module. Test integration of the Navigate feature. Introduction At this stage the Seminar Management solution is a combination of individual functions which the Cronus International Training Academy could use to input seminar master data, perform registrations, and post completed seminar registrations. The next step is to integrate these features with one another and with the standard application, making it user-friendly. This requires using MenuSuite objects and implementing Microsoft Dynamics ® NAV Navigate functionality. This chapter addresses the integration of solution functionality with the user interface (UI) of the application. Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Transcript of Na2009 enus devii_05

Page 1: Na2009 enus devii_05

Chapter 5: Integration

5-1

CHAPTER 5: INTEGRATION Objectives

The objectives are:

• Integrate previously created Seminar module features with one another by adding the Navigate feature to pages.

• Add to the Department Menu so that the Seminar module functionality is accessible in a standard way.

• Integrate the Navigate feature into the Seminar module. • Test integration of the Navigate feature.

Introduction At this stage the Seminar Management solution is a combination of individual functions which the Cronus International Training Academy could use to input seminar master data, perform registrations, and post completed seminar registrations. The next step is to integrate these features with one another and with the standard application, making it user-friendly. This requires using MenuSuite objects and implementing Microsoft Dynamics® NAV Navigate functionality. This chapter addresses the integration of solution functionality with the user interface (UI) of the application.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 2: Na2009 enus devii_05

C/SIDE Solution Development in Microsoft Dynamics® NAV 2009

5-2

Prerequisite Information Part of the Seminar module solution to be covered in this chapter involves making changes to tables that already contain data. Client data is valuable and moving that data about requires planning and accuracy. The following guidelines are put to use in this chapter and also later on in this course.

Changing Tables that Contain Data

When creating the Seminar module, a number of tables are created and a few are modified. C/SIDE is designed to ensure that data is not lost when modifying the design of a table. This means that while it is possible to change a table that contains data, there are important guidelines that specify which types of changes are allowed under certain conditions. These guidelines are as follows:

• The name of a field can always be changed. • In general, the data type for a field can only be changed if there is no

data in the field for any of the records in the table. • A field can always be added to a table as long as the maximum

record size is not exceeded. • A field can be deleted if the field does not contain any values.

Although the system will allows for the removal of a field even when there are remaining references, all references to the field from other tables, pages, and reports must be removed manually. The system will generate a run time error when a page or report is run with a reference to a field that no longer exists in the database.

• The length of a string field can always be increased. A string field has a data type of Code or Text.

• The length of a string field can be decreased as long as the length of all values in that field is equal to or smaller than the target size.

• Although the Field No. may be changed, that is allowed only if the field does not contain any values. This is done only if absolutely required. This is because existing code in other objects must be modified to reflect correct values in the references to the Field No.

Seminar Feature Integration The Seminar module project is now ready to integrate the features created thus far with one another and with those available in the standard application. To do so, it is necessary to add Navigate support to some pages and create a menu for the Seminar module as part of the main menu shown in the Departments area of the application.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 3: Na2009 enus devii_05

Chapter 5: Integration

5-3

In addition to creating a new department in the Navigation Pane, it might be beneficial to also create a new Role Center, and bring Seminar functionality straight to the users' home area. A Role Center is a special type of page that provides specific functionality in the home area for certain types of users. Guidelines on how to create Role Centers can be found in the UX Guide and in the Microsoft Dynamics NAV 2009 Developer and IT Pro Help. These sources are available in the standard documentation found on the Microsoft Dynamics NAV 2009 product media or in the following locations:

• User Experience Guidelines for Microsoft Dynamics NAV 2009 on the Microsoft Download Center

• Microsoft Dynamics NAV 2009 Developer and IT Pro Help on the Microsoft Download Center

• Microsoft Dynamics NAV 2009 Developer and IT Pro Help on MSDN

The Navigation Pane in Microsoft Dynamics NAV provides a summary of the number and type of entries posted for a specific document number posting date. This feature can be useful in helping the user easily trace the ledger entries that result from certain transactions. To make the Seminar module fit with the standard application and to improve usability, this feature will be integrated into the module.

Solution Analysis

To integrate the seminar features with one another, the registrations and ledger entries are available from the seminar pages developed earlier. A MenuSuite object is created for the Seminar module, which is used to expose functionality to the Departments area of the RoleTailored client.

The purpose of integration is to make all Seminar features available from the appropriate places in the application. This makes the customized application more user-friendly.

The appropriate seminar registrations and ledger entries must be accessible from the Seminar Card and Seminar List pages. The Seminar module must be accessible from the Departments area in the RoleTailored client, and this must be the typical method for seminar managers to access the Seminar module features.

When the seminar managers look at a seminar definition in the Seminar Card or Seminar List page, they can access the Seminar Registration for the seminar as well as the Seminar Ledger Entries that relate to the seminar.

Solution Design

To integrate the Seminar module as described in the analysis section, make modifications to some existing pages and tables and add the selections to the new Seminar Management Menu to the Partner MenuSuite. Because integration is largely a user interface issue, it is important to plan the user interface.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 4: Na2009 enus devii_05

C/SIDE Solution Development in Microsoft Dynamics® NAV 2009

5-4

The Seminar Card page is modified by adding a Registration section to the Related Information menu button as shown in the following illustration.

FIGURE 5.1 THE SEMINAR CARD PAGE (123456700) WITH RELATED INFORMATION MENU EXPANDED

The Seminar List page is modified by adding the same Registration section to the Action menu button as illustrated.

FIGURE 5.2 THE SEMINAR LIST PAGE (123456701)

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 5: Na2009 enus devii_05

Chapter 5: Integration

5-5

The Seminar Management Menu (as illustrated) is a new Partner-level menu accessible from the Departments area in the RoleTailored client. All Seminar module features are available from this menu.

FIGURE 5.3 THE SEMINAR MENU IN THE MENUSUITE DESIGNER

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 6: Na2009 enus devii_05

C/SIDE Solution Development in Microsoft Dynamics® NAV 2009

5-6

FIGURE 5.4 THE SEMINAR DEPARTMENT IN THE ROLETAILORED CLIENT

The seminar tree for this menu is as follows:

Menu Type Menu Name Group Comment

Group Seminars

Item Contacts Seminars Opens the Contact List page (5052).

Item Instructors Seminars Opens the Instructors page (123456705).

Item Seminars Seminars Opens the Seminar List page (123456701).

Group Periodic Activities

Seminars

Item Create Invoices

Periodic Activities

Runs report 123456700 (to be created later in the course) which create Seminar Invoices.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 7: Na2009 enus devii_05

Chapter 5: Integration

5-7

Menu Type Menu Name Group Comment

Group Order Processing

Item Seminar Registrations

Order Processing

Opens the Seminar Registration List page (123456710).

Item Sales Invoices

Order Processing

Opens the Sales Invoice List page (9301).

Group Reports Order Processing

Add reports under this group in Chapter 6.

Group Documents Order Processing

Add documents under this group in a later chapter.

Group History Order Processing

Item Posted Seminar Registrations

History Opens the Posted Seminar Registration List page (123456734).

Item Posted Seminar Charges

History Opens the Posted Seminar Charges page (123456739).

Item Posted Sales Invoices

History Opens the Posted Sales Invoice page (143).

Item Seminar Registers

History Opens the Seminar Registers page (123456722).

Item Navigate History Opens the Navigate page (344).

Group Setup

Item Seminar Setup

Setup Opens the Seminar Setup page (123456702).

Item Seminar Rooms

Setup Opens the Seminar Room Card page (123456703).

Item Seminar Charges

Setup Opens the Seminar Charges page (123456724).

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 8: Na2009 enus devii_05

C/SIDE Solution Development in Microsoft Dynamics® NAV 2009

5-8

Lab 5.1 - Integrating Seminar Features In the later stages of the Seminar module development and integration, a number of necessary, relatively simple processes and connections must be created.

Scenario

Modify the Seminar Card and the Seminar List to add actions to call up the Seminar Leger Entries List and the Seminar Registration List. Create a new Navigation Pane layout as shown in the preceding Solution Design section of this chapter.

Step by Step

Now that the Analysis and Design phases are complete, the solution can be implemented. Begin by making modifications to the Seminar Card and Seminar List pages.

1. Add the new section and the new menu items to the Related Information menu on the Seminar Card page (123456700) as follows:

Menu Button

Options Comment

Seminar Entries Opens the submenu with the following option: Ledger Entries (CTRL + Shift + N): Opens the Seminar Ledger Entries page (123456721) filtered to entries with a corresponding Seminar No. Run the link whenever the page is updated. The lines in the page are to be sorted by Seminar No. and Posting Date.

Registration Registrations Opens the Seminar Registration page (123456710) for registrations with a Seminar Code that corresponds to the No. field. Run the link whenever the page is updated.

2. Add the same selection and menu items to the Related Information

menu on the Seminar List page (123456701) added to the Seminar Card above.

3. Open the new MenuSuite using the "Partner" level created for testing in earlier chapters. Refer to the Navigation Pane Designer open on the left.

4. Right-click on a menu on the Navigation Pane Designer and select Create Menu. Set the caption to Seminars and the bitmap to 8.

5. Create the tree in the Seminar Menu as shown in the Solution Design section.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 9: Na2009 enus devii_05

Chapter 5: Integration

5-9

Navigate Integration The purpose of integrating the Navigate feature is to improve the traceability of transactions to their ledger entries.

Solution Analysis

The user accesses the Navigate function from ledger entry pages and posted seminar documents as well as from the standard application.

When the seminar managers want to view a complete summary of the ledger entries that are created for a posted seminar registration or ledger entry, they will use Navigate.

Solution Design

As an integration topic, the design of this solution centers on the user interface, but some table modifications are necessary as well.

Make the Navigate feature available from the Seminar Ledger Entries page and the Posted Seminar Registration page.

Modify the Seminar Ledger Entries page by adding a Navigate command to the Actions menu, as shown in the following illustration.

FIGURE 5.5 THE SEMINAR LEDGER ENTRIES PAGE (123456721)

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 10: Na2009 enus devii_05

C/SIDE Solution Development in Microsoft Dynamics® NAV 2009

5-10

The Posted Seminar Registration page is modified by adding a Navigate command to the Actions menu, as shown in the following illustration.

FIGURE 5.6 THE POSTED SEMINAR REGISTRATION PAGE (123456734)

Table Design

This solution does not require new tables, but it does require new keys for two tables. These new keys are specified in the development instructions of the following lab.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 11: Na2009 enus devii_05

Chapter 5: Integration

5-11

Lab 5.2 - Modifying Objects to Integrate with Navigate The Navigate function is a unique and extremely valuable feature of Microsoft Dynamics NAV systems. A complete and seamless integration of the new Seminar module into Microsoft Dynamics NAV 2009 requires integration into the Navigate function.

Scenario

Review how the Navigate function supports filtering and displaying data in other modules within Microsoft Dynamics NAV 2009. Using that information as a model, make the modifications necessary to have the Navigate function also handle Seminar module data. Test the results.

Step by Step

The development steps to integrate the Navigate feature consist of adding keys to the ledger entry tables of the Seminar module, adding code to the Navigate page and adding commands to Action menus of pages as shown in the Solution Design section.

1. Add the secondary key Document No., Posting Date to the Seminar Ledger Entry table (123456732).

2. In the Navigate page (344), add the following global variables:

Name DataType Subtype Length

SeminarRegHeader Record Seminar Registration Header

PstdSeminarRegHeader Record Posted Seminar Reg. Header

SeminarLedgEntry Record Seminar Ledger Entry

3. Enter code in the FindRecords function trigger of the Navigate page

so that the function performs the following tasks: o If the READPERMISSION property is TRUE on the Seminar

Registration Header record, the program resets this record variable and filters the table to the records where the No. matches the DocNoFilter variable and the Posting Date matches the PostingDateFilter variable. Next, the program runs the function InsertIntoDocEntry.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 12: Na2009 enus devii_05

C/SIDE Solution Development in Microsoft Dynamics® NAV 2009

5-12

o The program then performs the same steps as above for the Posted Seminar Reg. Header table and the Seminar Ledger Entry table.

FIGURE 5.7 STEPS FOR POSTED SEMINAR REG. HEADER TABLE AND SEMINAR LEDGER ENTRY TABLE

4. Enter code in the ShowRecords function trigger of the Navigate form so that the function performs the following tasks: o When the Table ID is the Seminar Registration Header, the

function runs the lookup form for the Seminar Registration Header table.

o When the Table ID is the Posted Seminar Reg. Header, the function runs the lookup form for the Posted Seminar Reg. Header table.

o When the Table ID is the Seminar Ledger Entry, the function runs the lookup form for the Seminar Ledger Entry table.

FIGURE 5.8 SHOW RECORDS FUNCTION TRIGGER

NOTE: The call to open the form passes the value 0 (zero) into the FORM RUN command. This will cause the system to open the default lookup form that is defined for the table. Ensure that the three tables which are added to the Navigate functionality have lookup forms defined.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 13: Na2009 enus devii_05

Chapter 5: Integration

5-13

5. Open the Seminar Registration Header table (123456710), and see that both the LookupFormID and DrillDownFormID properties have the value Form 123456713. The name is confusing, as it does not display the name of the page. It will actually open a page object when the navigate function runs in the Role Tailored client.

6. Repeat this process for the Posted Seminar Reg. Header table (123456718), with lookup page ID 123456736, and the Seminar Ledger Entry table with lookup page ID 123456721

7. Add the Navigate command to the Actions menu on the Seminar Ledger Entries page (123456721). Look at the Item Ledger Entries page (38) for an example of how the Navigate function is provided in a standard object. Pay attention to the Image, Promoted and PromotedCategory properties of the Action menu item.

8. Enter code in the appropriate trigger so that when the user clicks the Navigate selection, the program runs the SetDoc function of the Navigate page and then runs the Navigate page.

9. Add the Navigate command to the Actions menu of the Posted Seminar Registration page (123456734) and to the Posted Seminar Reg. List page (123456736).

10. Enter code in the appropriate trigger so that when the user clicks the Navigate selection, the program runs the SetDoc function of the Navigate page and then runs the Navigate page.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 14: Na2009 enus devii_05

C/SIDE Solution Development in Microsoft Dynamics® NAV 2009

5-14

Testing Managing Integration Use the following steps to test completed functionality:

1. Click the Seminars menu item in the Navigation Pane. 2. In the menu tree, click each of the items and check that the

appropriate page or report opens. Remember that there are some items yet to be developed.

3. Use the Posted Registrations menu item to open the Posted Seminar Registrations page. Click the Navigate button and see that the Navigate page opens with the same Document Number.

4. Select Seminar Ledger Entry in the subpage and click Show. The Seminar Ledger Entries page opens with the entries related to Posted Seminar Registration.

Summary The Seminar modules individual features are now working with one another. This was accomplished by integrating the previously created Seminar module features with one another by adding them to a common menu. The Navigate pane was added to the Seminar module to provide functionality and accessibility in a standard way. Also, the Navigate Window was integrated into the Seminar module.

In the next chapter, reports are added to the Seminar module.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 15: Na2009 enus devii_05

Chapter 5: Integration

5-15

Test Your Knowledge

1. What is the standard Microsoft Dynamics NAV shortcut for viewing Ledger Entries?

2. As a developer, at what level do you normally create MenuSuite objects?

3. From which types of pages is the Navigate feature typically available?

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 16: Na2009 enus devii_05

C/SIDE Solution Development in Microsoft Dynamics® NAV 2009

5-16

Quick Interaction: Lessons Learned Take a moment and write down three key points you have learned from this chapter

1.

2.

3.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 17: Na2009 enus devii_05

Chapter 5: Integration

5-17

Solutions Test Your Knowledge

1. What is the standard Microsoft Dynamics NAV shortcut for viewing Ledger Entries?

MODEL ANSWER:

The standard Microsoft Dynamics® NAV shortcut key for viewing Ledger Entries is Ctrl + Shift + N.

2. As a developer, at what level do you normally create MenuSuite objects?

MODEL ANSWER:

As a developer working for a Microsoft Dynamics® NAV partner, you usually work with MenuSuite objects at the Partner level. As a developer working for an end user, you usually work with MenuSuite objects at the Company level.

3. From which types of pages is the Navigate feature typically available?

MODEL ANSWER:

The Navigate function is typically available for pages that show posted documents and from pages that show ledger entries.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 18: Na2009 enus devii_05

C/SIDE Solution Development in Microsoft Dynamics® NAV 2009

5-18

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement