Configuring The Fleet Management Sample Application

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Microsoft Dynamics AX 2012

Configuring the Fleet


Management Sample
Application
This paper describes how to set up and configure the Fleet
Management application for Microsoft Dynamics AX 2012.

Date: July 2011

Table of Contents
Overview..................................................................................................... 3
Audience.............................................................................................................................. 3

Setting up Fleet management ..................................................................... 3


System Requirements ........................................................................................................... 3
Import Fleet Management Model ............................................................................................. 3
Configure the system for your organization .............................................................................. 4
Generate Sample Data .......................................................................................................... 4
Configure Workflow components ............................................................................................. 4
Configure the Application Integration Framework component ..................................................... 5
Create and configure an inbound integration port...................................................................... 5
HRM Data Setup ................................................................................................................... 5
You are done with the setup and configuration of Fleet Management application! .......................... 6

Scenarios showcased and high level design of the FM Inc. setup ................ 7
Organization model ............................................................................................................... 7
Data Model .......................................................................................................................... 7
Features covered ............................................................................................................... 7
Other Features covered by the sample (by feature area) ........................................................... 8

2
CONFIGURING THE FLEET MANAGEMENT SAMPLE APPLICATION

Overview
This paper describes how to set up and configure the Fleet Management application for
Microsoft Dynamics AX 2012. The Fleet Management demo application is an illustrative
sample that demonstrates how you can leverage the foundation framework technology
features to build applications.
This application is more illustrative than prescriptive. In particular, it does not demonstrate
much of the rich application module functionality that ships in the base foundation model. It
does not handle many error conditions or exceptions. We advise that you use this
application as an educational tool only.

Audience
The reader is expected to be already familiar with developing applications for Microsoft
Dynamics AX. This is not a tutorial for beginners. It assumes familiarity with the X++ and
C# programming languages and with the MorphX developer workspace and the Microsoft
Visual Studio Integrated Development Environment (IDE) tools.

Setting up Fleet management


System Requirements
You must have Microsoft Dynamics AX 2012 installed with the following components:

Application Object Server

Client

Visual Studio Tools for Microsoft Dynamics AX

Web services components on IIS

Enterprise Portal for Microsoft Dynamics AX

Debugger

Import Fleet Management Model


1. Log in as a user in the role of a System Administrator in the AX system.
2. Go to <%server installation folder%>/Microsoft Dynamics AX/60/Managementutilities
3. Run:
axutil.exe import /file:<%Path to Fleetmanagement.axmodel%>

By default the model is set to be imported into the ISV layer. Ensure that you have the
necessary license key code to access the layer where you are importing the model into.
4. After the import is complete, you must restart the Microsoft Dynamics AX service and open a new
AX client instance. When prompted, you must Compile and Sync the changes. This could take a
long time.
5. If you see a compile error in the class FMRentalCheckoutCustomization, then you should open
the C Sharp project, FMDrivingRecordChecker , in Visual Studio, and rebuild and deploy this
project.

3
CONFIGURING THE FLEET MANAGEMENT SAMPLE APPLICATION

Configure the system for your organization


1. Create the user accounts as appropriate for your organization. Open the class FMDataHelper and
uncomment the code in the method usersInsert. Replace the user name, user SID and domain
name parameters as appropriate for your organization. Save and compile the changes.
addUser('serv', 'John Smith', 'S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxx', 'usrX',
'mydomain.mycompany.com');
addUser('clerk', 'April Stewart', ' S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxx,
usrX', 'mydomain.mycompany.com');
addUser('mgr1', 'Tom Michaels',
S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxx,
usrX', 'mydomain.mycompany.com');
addUser('mgr2', 'Vidhya Mahadevan' S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxx,
usrX', 'mydomain.mycompany.com');
addUser('self', 'Adam Carter' S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxx, usrX',
'mydomain.mycompany.com');

Mgr1

Domain\usr1

Redmond Manager

Tom Michaels

Mgr2

Domain\user2

Washington Branch
Manager

Vidhya Mahadevan

Clerk

Domain\user3

Redmond Clerk

April Stewart

serv

Domain\user4

Redmond Service Tech

John Smith

Self

Domain\user5

Self

Adam Carter

2. Create a project to help manage the development tasks for Fleet management. Click Tools >
Model management > Create project from model, and then pick Fleet management model.

Generate Sample Data


1. Go to the Project Viewer and open the project that you created.
2. Go to the Jobs Node in the project
3. Run the SetupFleetManagement job.

The number sequence wizard will popup twice during this process. Please follow through
and complete the wizard.

Configure Workflow components


1. Open the Microsoft Dynamics AX Client and open the Fleet Management Module.
2. Click the Workflow Setup menu item.
3. Click Import in the action pane.

Import the workflow Vehicle Service-1.1.0.0.xml, set this as default and activate it.
You can find this XML in the Visual Studio projects node, FMWorkflowXML.
4. Set the workflow execution account to Admin.
5. Start the workflow batch jobs (System administration > Setup > Workflow > Workflow
infrastructure configuration).
4
CONFIGURING THE FLEET MANAGEMENT SAMPLE APPLICATION

Configure the Application Integration Framework component


1. Ensure that the AIF batch jobs for the following functions are configured:

AIFInboundprocessingservice
AIFOutboundprocessingservice
AifGatewaySendReceive

2. Create an Axd document service by starting with the query FMAxdVehicleQuery.

Right-click on the query and run the AIF Document Service Wizard. You must include
the create, update and read operations as part of the service generation. Override the
method useNaturalEntityKey in the class AxdFMAxDVehicleQuery to return true.
3. Compile the generated project to ensure that the class FMAxDVehicleQueryDocumentService that
implements the service body is complete.
4. Open System administration > Setup > Checklists > Initialization checklist and run the
Set up Application Integration Framework item. This could take a long time.
5. In the Development Workspace, on the Build menu, click Generate Incremental CIL.

Create and configure an inbound integration port


1. Go to Administration > Services and Application Integration Framework > Inbound
Ports, and click New to create a new inbound port.
Name it FMRecallServicePort.
2. Set Adapter to be File System Adapter and set the URI for the port to a file directory where you
want to place the input CSV files.
3. Open the Service contract customizations Fast Tab, click Service operations, and then select
the document service that you created above. Select the create operation to be included in the
selected operations.
4. Open the Processing options FastTab. Select the Replace existing documents on create
checkbox.
5. Open the Processing options FastTab. Select the Transform all requests checkbox.
6. Click Inbound Transforms to open the Inbound Transforms form
7. Click Manage Transforms, and then click New to add a new transform to that uses the .NET
assembly CVSToXMLTransform.dll. Give a name to the transform. You can find the C# project to
generate this DLL in the Visual Studio Projects > C Sharp Projects > FMCSVtoXMlTransform
project. Load this assembly for creating a .NET assembly type transform.
8. Close the Manage Transform form.
9. In the Inbound transforms form, click New and select the transform that you added above to
add it to the port configuration. Close the Inbound transforms form.
10. At the top of the Inbound ports form, click Activate to activate and deploy the
FMRecallServiceport port. This operation will take a few minutes.

HRM Data Setup


1. Open the Human resources module in the Microsoft Dynamics AX client.
2. Open Setup > Workers > Titles. Create Manager, Clerk, and Service Tech titles, and then
close the form.
5
CONFIGURING THE FLEET MANAGEMENT SAMPLE APPLICATION

3. Open Common > Organization > Jobs. Click New Job in the Action Pane. Create Manager,
Clerk, and Service Tech jobs, each with their corresponding title.
4. Open Common > Organization > Positions > Positions. Click New position in the Action
Pane. Create SEATAC Manager, Redmond Manager, Redmond Clerk, Redmond Service
Tech, and Washington Branch Manager positions, listing the name of the position in the
description box and matching each with its corresponding job.
5. Open Common > Workers > Workers. Click Hire new worker in the Action Pane. Assign each
person the position listed.
Position

Employee

Redmond Manager

Tom Michaels

Redmond Clerk

April Stewart

Redmond Service Tech

John Smith

Washington Branch Manager

Vidhya Mahadevan

6. Open the System Administration module.


7. For each user, open the Users form for each user, click Relations and then assign each
username to the corresponding workers created above.
8. Open System Administration> Setup > Security > Assign Users to Roles.
9. Click each of the roles that start with Fleet Management and add a rule,
FMDynamicRoleAssignmentWorkerTitle.
10. Edit the query to ensure that the range criteria for the Title field is set to Manager, Clerk and
Service technician for the respective roles.

You are done with the setup and configuration of Fleet Management
application!

6
CONFIGURING THE FLEET MANAGEMENT SAMPLE APPLICATION

Scenarios showcased and high level design of the FM Inc.


setup
Organization model
The FM Inc. organization is designed as shown below, with the corporate office and branch
office and locations.

Data Model
The most important aspects of data model design are captured in the vehicle related tables
for FM. Here is the high level overview of the most interesting aspects of the data model
design.
Features covered

Table Relations

Table Inheritance

Date effective table modeling

Date effective forms

Filter on outer joins


7
CONFIGURING THE FLEET MANAGEMENT SAMPLE APPLICATION

Grouping and group/aggregate filtering

Unit of Work

Other Features covered by the sample (by feature area)


Events based customization

Delegate

Event handler

X++/.NET strongly typed interop

Visual Studio Tools for AX

Workflow

Workflow runtime

Workflow history

Application Integration Framework

Inbound Enhanced Integration port

Support for non-XML file format based integrations

8
CONFIGURING THE FLEET MANAGEMENT SAMPLE APPLICATION

Services programming model

No code Data contract creation

Service groups

Security

Role based security

XDS security policies

Enterprise Portal

List pages

Reusable controls

9
CONFIGURING THE FLEET MANAGEMENT SAMPLE APPLICATION

Microsoft Dynamics is a line of integrated, adaptable business management solutions that enables you and your
people to make business decisions with greater confidence. Microsoft Dynamics works like and with familiar
Microsoft software, automating and streamlining financial, customer relationship and supply chain processes in a
way that helps you drive business success.
U.S. and Canada Toll Free 1-888-477-7989
Worldwide +1-701-281-6500
www.microsoft.com/dynamics

This document is provided as-is. Information and views expressed in this document, including URL and other
Internet Web site references, may change without notice. You bear the risk of using it.
Some examples depicted herein are provided for illustration only and are fictitious. No real association or
connection is intended or should be inferred.
This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You
may copy and use this document for your internal, reference purposes. You may modify this document for your
internal, reference purposes.
2011 Microsoft Corporation. All rights reserved.
Microsoft, Microsoft Dynamics, and the Microsoft Dynamics logo are trademarks of the Microsoft group of
companies.
All other trademarks are property of their respective owners.

10
CONFIGURING THE FLEET MANAGEMENT SAMPLE APPLICATION

You might also like