6 min read

(Further on Microsoft Dynamics NAV:here.)

Fit-gap analysis

When we do a fit-gap analysis we look at the company’s processes and define what we can and cannot do with the standard package. When a business process can be handled with the standard software we call this a Fit. When it cannot be done it’s a Gap, we can fill a gap by developing a solution or purchasing an add-on.

But even when something could be done with standard software features, it does not necessarily mean that doing this is wise. The standard application should be used for what it was designed for. Using standard features for something else might work in the current version but if it changes in a new version it might no longer fit. For this reason it is better to design something new instead of wrongly using standard features.

Designing a Squash Court application

The basic process of a squash court company is renting the courts to squash players; both members and non-members. There is a reservation and invoicing process handling different rates for members and non-members.

Although this could be implemented using items to represent squash courts and customers to represent players this would be a typical example of using standard features wrongly. Instead of doing this we will look at how items and customers are designed and use this to create a new Squash Court application.

Look, learn, and love

To determine the design for this application we will first look at the parts of the standard application (we could have used) to learn how they work. We will use this knowledge in our own design.

In Microsoft Dynamics NAV, customer and vendor master data are maintained using Relationship Management (RM). For our solution we will create a new master data for squash players being the business part of application. This will also be integrated with RM.

To design the Squash Court we will look at the design of items in the standard package. The Squash Court will be the product part of our application having a journal to create reservation entries, which we can invoice.

For this invoicing process we will use and integrate with the Sales part of Microsoft Dynamics NAV.

Drawing the table and posting schema

After we have decided what the design of our application will be, we can draw the tables and post the routines. This will clarify the design for others and guide us through the development process.

The objects in Relationship Management and Sales are standard objects that we will possibly need to modify. The objects for the Squash Application are new objects but based on similar objects in the standard application.

The objects in Relationship Management and Sales are standard objects that we will possibly need to modify. The objects for the Squash Application are new objects but based on similar objects in the standard application.

The Project approach

In order to keep track of our project we’ll cut the changes into smaller tasks. The first task will be to do the changes in Relationship Management to be able to create a squash player from a contact. The second task is to create squash courts. The reservation and invoice processes are tasks three and four.

Interfacing with the standard application

In our schema we can see that we have two processes where we need to touch the standard Microsoft Dynamics NAV processes, which are Relationship Management and Sales.

Getting started

In the first part of the design process we will look at how to reverse engineer the standard application in order to learn and reuse the knowledge in our own solution.

Creating squash players

For our squash players administration we will use the data from the Contact table. In the standard product it is possible to create a customer or vendor with the contact data. We require the same functionality to create squash players so let’s have a look at how this is done by Microsoft.

Open the contact card and try to find this function (as shown in the following screenshot):

Microsoft Dynamics NAV 2009: Apply reverse engineering to  customize our application

We want a function like this for our squash players. So let’s get in and see what it does. For this we need to design the page and look at the actions. The page number in this case is 5050 which we can find by clicking on About This Page in the upright corner of the page as shown in the following screenshot:

Microsoft Dynamics NAV 2009: Apply reverse engineering to  customize our application

This option can be useful for finding information about the fields that are not on the page, the filters or the source table:

Microsoft Dynamics NAV 2009: Apply reverse engineering to  customize our application

To open the page we need to open the Object Designer (Shift F12) in the Classic client as shown in the following screenshot:

Microsoft Dynamics NAV 2009: Apply reverse engineering to  customize our application

Here in the Object Designer we can find page 5050, Contact Card, as shown:

Microsoft Dynamics NAV 2009: Apply reverse engineering to  customize our application

We are looking for the Actions on this page. They are kind of difficult to find if you are unfamiliar with the Page Designer. To open the Actions, the cursor should be on the blank line below the last populated line. Then press the right mouse button and Actions or select Actions from the View drop down menu:

Microsoft Dynamics NAV 2009: Apply reverse engineering to  customize our application

Now we are in the Action Designer and we can search for the Create as part.

Microsoft Dynamics NAV 2009: Apply reverse engineering to  customize our application

To see what it does we need to go into the C/AL code by pressing F9 or by selecting C/AL Code from the View drop down menu as shown in the following screenshot:

Microsoft Dynamics NAV 2009: Apply reverse engineering to  customize our application

CreateVendor versus CreateCustomer

In Microsoft Dynamics NAV there is a small difference between creating a customer and a vendor from a contact. When creating a customer the system will ask us to select a customer template. The vendor option does not have this. Because of this simplicity we will look at and learn from the Vendor function in this article.

The customer and vendor table are almost identical in structure and fields are numbered similar in both tables. This is called transaction mirroring between sales and purchasin. We will mirror our new table in a similar way to the other Microsoft Dynamics NAV tables.

The C/AL code in the Action tells us that while pushing the menu option, the function CreateVendor in the contact table is started. To copy this feature we need to create a new function CreateSquashPlayer. Let’s keep this in mind while we dive further into this code.

Microsoft Dynamics NAV 2009: Apply reverse engineering to  customize our application

Open the Contact table (no. 5050), and search the function CreateVendor. You can find functions in a table by going into the C/AL code (F9) from anywhere in the table designer, and use the Find (Ctrl+F) function as shown in the following screenshot:

Microsoft Dynamics NAV 2009: Apply reverse engineering to  customize our application

LEAVE A REPLY

Please enter your comment!
Please enter your name here