Académique Documents
Professionnel Documents
Culture Documents
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Module 8: EXTENSIBILITY BEST PRACTICES
Lesson 1: Solution Approach .....................................................................................................................8-2
Lesson 2: Reference .......................................................................................................................................8-5
Table of Contents
Module 16: REAL-TIME SERVICES EXTENSIBILITY SAMPLE AND
HOW-TO
Lesson 1: Extending the RetailTransactionServiceEx Class .......................................................... 16-2
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
POS Framework
Technical background
Localization Information
POS Themes
1-1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Module Review
Student Objectives
1-2
1.
2.
Objectives
The main objective of this module is to discuss the Microsoft Dynamics POS
Overview.
2- 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Introduction to POS
Microsoft Dynamics AX for Retail POS
Microsoft Dynamics AX Retail POS is a solution that brings speed, power,
flexibility, dependability, and ease of use to the point-of-sale. Retail POS has a
dynamic interface that can be configured and customized for your type of
business and store procedures. Additionally, Retail POS can work offline. This helps
make sure that your stores remain fully operational during network interruptions.
All data is automatically updated when the connection is restored.
2-2
Store Database:
Each store must have its own database, and a single database is used for multiple
registers. This helps make sure that the same master data is available to all POS
registers in the store.
Offline Database:
You can also create an offline databases on POS computers. An offline database
helps make sure that the stores operations can continue even if the connection to
the shared database server is lost. If the connection to the shared database server
is lost, the POS computers switch to offline databases. The shared database and
the offline databases are kept in sync by using Microsoft Sync framework.
The store and the offline database can be set up by using the create database
utility.
2-3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Microsoft Dynamics POS Operations
Microsoft Dynamics AX for Retail POS is the point of sale (POS) program for Retail.
You can use Retail POS to perform the following tasks:
Process sales
Calculate tax
Calculate the change that is due back from the amount that is paid
Suspend transactions
Receive payments
Print receipts
The following operations cannot be performed when the store database is offline:
2-4
Print an X report
Print a Z report
Close a shift
Blind-close a shift
Inventory Lookup
Loyalty Operations
2-5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Module Review
Module Review and Takeaways
Synch service
POS Operations
2-6
1.
2.
3.
What is the difference between the CDX synch service and the CDX Real-time
service?
4.
5.
6.
Describe any two operations that cannot be performed when the POS store
database is offline.
2.
3.
Synch service is used for synching the data between HQ and POS.
Real time service is used for providing real-time information form the
HQ.
4.
5.
No. Only the store database can be shared across multiple terminals.
6.
2-7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
2-8
Objectives
The main objective of this module is to help you understand how to customize
and extend the Microsoft Dynamics AX 2012 POS. After you complete this course,
you will know how to customize and extend POS.
3- 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Lesson Objectives
How to customize or extend Microsoft Dynamics AX 2012 POS.
POS Extension
To customize business logic in Retail POS, you must install the Retail Software
Development Kit (SDK). The SDK is included with Microsoft Dynamics AX 2012. It
contains two folders:
POS Plug-ins Contains code that you use to extend and customize
Retail POS. For more information about how to install Retail POS
Plug-ins, refer to Install Retail SDK.
Lesson Objectives
After you complete this lesson, you will know how to customize or extend the
Microsoft Dynamics AX 2012 POS.
3-2
The folder contains two Visual Studio solutionsone for services and the other for
triggers. Triggers are used to insert custom code before or after Retail POS
operations, such as issuing a gift certificate, a customer add, a clear, or a payment,
and more. For example: Before you issue a gift card, if you want to do a validation
such as whether the customer is eligible to issue a gift card, you can perform the
validation here.
The Microsoft.Dynamics.Retail.Pos.Contracts.dll assembly exposes all the public
interfaces to be used for implementing extensions and customizations to the
following Retail POS functionality:
Operations
Services
Triggers
3-3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Operations
An operation is an activity that occurs in Retail POS. Operations can be a single
step or a multi-step. Refer to the POS Framework course document for more
information.
Services
Services include one or more operations and implement a single, unique interface.
You can make partial modifications to an existing service and continue to use the
remaining functionality. Or, you can replace the complete service assembly with
your own custom code. For more information about how to implement services,
refer to How to modify a Form at http://technet.microsoft.com/enus/library/jj937978.aspx
Triggers
Triggers are events raised by Retail POS that enable you to insert custom code
before or after operations. There are two types of triggers:
Pre-triggers
Post-triggers
Please refer the POS Framework course document for more information.
3-4
Lesson Objectives
This lesson helps you understand the real time service functionality of Microsoft
Dynamics AX 2012 POS.
3-5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Module Review
Module Review and Takeaways
Tools
3-6
1.
2.
3.
4.
5.
2.
3.
4.
5.
Services contains the core business logic whereas triggers are events
raised by Retail POS that enable you to insert custom code before or
after operations.
3-7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
3-8
Objectives
The main objective of this module is to help understand the POS technical
framework, its components and other retail components it uses.
4-1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
POS Core
POS Database
POS Architecture
The POS Architecture consists of the POS Core components.
4-2
Operations
Transaction
SystemFramework
SystemeSettings
Contracts
4-3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Operations
An operation is an activity that occurs in Retail POS. Operations can be a single
step, or a multi-step. For example, Add Item adds a sales line to the current
transaction. The Customer add operation presents a form for a cashier to enter
customer information. After data is entered and the form is closed, the customer
information is sent to Retail Headquarters.
Microsoft Dynamics AX 2012 includes a collection of core operations that cannot
be modified. However, you can create new functionality by using the
BlankOperations. You can use Blank Operations to extend Microsoft Dynamics AX
for Retail POS by adding custom logic to the Retail POS register buttons. In the
Retail POS register, you can add the blank operation button to the POS layout and
link it with your custom operations.
Transaction
The transaction dll contains the core transaction classes and Interfaces that are
used in standard and extended components. Most POS operations will have the
POS transaction passed as parameters that are during the operation.
System Framework:
This dll contains the transaction service. This service is a direct start to
Headquarters (HQ).
System Settings:
This dll contains all the settings that are related to connection details, operator
details, terminal details, store details, transaction service details, hardware profile,
functionality profile and other Application details that can be used while
extending POS.
Data Access:
This dll acts as a data layer between the application and the POS database. It
provides a set of interfaces and, or classes that are used in standard operations,
services and triggers.
Contracts
The contracts dll contains interfaces that are used across multiple core and
extended components of Point of Sale. When POS Plugins are installed, this dll is
included as part of plugin code. When you extend a service and, or triggers, add
this dll to the project. Also, dll should be deployed to the POS folder, after you
extend.
4-4
Services Forms
Although third-party components from the DevExpress libraries were used to
build the POS application, you do not have to be familiar with how to set up a
development environment by using the DevExpress libraries.
All Windows forms in POS are developed by using the "DXExperience Winforms"
product that is created by DevExpress. However, you must have a DevExpress
license to modify the design-time visual changes to existing forms. Although you
are not required to have DevExpress tools to create new POS forms, it is
recommended that you use them to have a consistent appearance with the rest of
the product.
Microsoft Dynamics AX 2012 R2 POS introduces a new way to customize forms by
using the Interaction service. Multiple developers can customize one or more
forms in one service. If there are multiple customizations, the Interaction service
loads only the first customization it finds for a form. The following list of forms
uses this new pattern and their implementations are included in the
InteractionDefaults service.
ExtendedLogOnForm
ExtendedLogOnScanForm
frmBarcodeSelect
frmDimensions
frmInput
frmPayCash
frmPayCurrency
frmPayCustomerAccount
frmReturnTransaction
LogbookForm
LogOnForm
ManagerAccessForm
RegisterTimeForm
ViewTimeClockEntriesForm
ProductDetailsForm
ProductInformationForm
4-5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Skins:
By using the DevExpress SkinEditor program, you can change the appearance of
Microsoft Dynamics AX for Retail POS registers by creating new Retail POS skins.
To create new Retail POS skins, you must obtain a license from DevExpress. Retail
POS uses DXExperience Winforms that is created by DevExpress. You can develop
your own forms without having to use DevExpress. However, it is recommended
that you use these to maintain a consistent appearance.
4-6
4-7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
POS Database
This lesson explains about the POS store database and offline database.
Lesson Objectives
Store Database
Offline Database
Store Database
Store database is a central database that is inside a store. Typically, a store
database is hosted on a shared server that is connected to all the POS terminals in
the store. Multiple POS computers in a store can connect to the same store
database.
Store database data is synched with HQ by using the Synch service.
4-8
4-9
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Module Review
Module Review and Takeaways
POS Architecture
POS Core
POS Database
4 - 10
1.
2.
3.
4.
5.
Which service synchs the data between the store database and the offline
database?
POS Core, CDX Real-time service, CDX Synch service and store
database
The POS core is the focal point of the POS that interacts between the
POS UI and the POS data layer.
The dll transaction contains the core transaction classes and the
Interfaces that are used in standard and extended components. Most
POS operations will have the POS transaction passed as parameters,
which are used during the operation.
4 - 11
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
4 - 12
Objectives
5-1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Requirements
Windows Server 2012 Standard Edition or
Datacenter
Edition
Windows Server 2008 R2 Standard Edition,
Enterprise Edition, Web Edition, or Datacenter
Edition
Windows Server 2008 Standard Edition, Enterprise
Edition, Web Edition, or Datacenter Edition, with
Service Pack 2 (Only 64-bit versions of Windows
Server 2008 are supported)
Processor
5- 2
RAM
Minimum 80 GB
Requirements
Application Object
Server (AOS)
Notes
Install SQL Server Native
Client on the AOS server
if the AOS server is
separate from the
database server.
You must install the SQL
Server 2008 version of the
Native Client, even if you
are using SQL
Server 2012.
AX Client
Debugger
5-3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Components
Requirements
Database
5- 4
Notes
By default, SQL Server
2012 is supported with
Microsoft Dynamics AX
2012 R2. To use SQL
Server 2012 with an
earlier version of
Microsoft Dynamics AX
2012, you must install
Microsoft Dynamics AX
hotfix 2680186
(https://mbs2.microsoft.c
om/Knowledgebase/KBDi
splay.aspx?scid=kb;enus;2680186).
Only 64-bit versions of
SQL Server are supported.
For the minimum
hardware requirements
for SQL Server, see
http://www.microsoft.com
/sql/default.mspx.
In a production
environment, we
recommend that you
install the latest
cumulative update for the
version of SQL Server that
you are using.
Objectives
6-1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
POS Functionality
The developer should have a basic understanding of POS processes and
functionality to extend or customize POS. Please refer POS functional training
document (AX2012 ENUS_RTL) for more information.
Knowledge on X++
Basic knowledge on x++ is required to customize or extend CDX Real-time
service.
6-2
Objectives
Explain the requirements that are used to change POS labels and
strings.
7-1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
POS Localization
Localization is the process of adapting software to meet country-specific laws or
regulations. Microsoft localizes Microsoft Dynamics AX to include features and
functionality designed to address specific tax, accounting or financial reporting
requirements for various countries.
Languages
Translation is the process of adapting software or documentation to meet
language requirements for a particular country. For any given language, Microsoft
may translate some, all or none of the user interface (UI) and documentation for
Microsoft Dynamics AX.
To set up POS in specific language, go the respective Retail Channel and change
the retail channel language. We can change the language in AX Retail by
navigating to Retail->Common->Retail channels->Retail stores->Language
7-2
When a string is found, it gets cached for the remainder of the POS instance
lifetime. As a developer, this means that you cannot manipulate the strings at
runtime any changes that are made to the table do not get reflected until the
next time the app is started.
7-3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
7-4
7-5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
7-6
Module Review
Module Review and Takeaways
What is the command parameter used to launch POS in special mode which
displays the label ids?
2.
In which table the POS custom strings and labels are stored?
3.
Which library stores all the POS labels and string resources?
7-7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
7-8
1.
-tr
2.
RETAILLANGUAGETEXT table
3.
POSResources.resources.dll
Objectives
8-1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Solution Approach
There are two primary approaches for POS customization. These are:
1.
Greenfield Development
2.
Brownfield Development
Greenfield Development
The Greenfield approach for adding customizations on POS is to implement the
customization in default interfaces provided by the plugins. Then Replace the
OOB DLL provided by the Retail POS installation with the custom DLL.
For example, in order to customize the Sales Order service, load the services
solution form the Retail POS SDK(By default the SDK path will be
C:\Users\...\Documents\Retail SDK\POS Plug-ins\) folder and extend it by adding
the new classes and methods within the same SalesOrder project.
Brownfield Development
In brownfield development style, partial classes are used to keep customized
code separate from the OOB plugins code.
The advantages of using partial classes is that
During operations lifecycle of the system, you can more easily find if
the issue belongs to OOB Plugin code or it is customized code
In all Retail implementation of AX, each customer will have a specific requirement
for authorizing credit card payments. To do that, developer will have to modify
the EFT class provided in the EFT Project. To incorporate this change, follow the
below steps:
8-2
Rename the namespace to match the OOB class, which in the current
scenario, will be namespace EFT
If the class is not partial class, rename the class declaration to partial;
in the current scenario, it will be public partial class EFT: IEFT
Solution Configuration
When setting the solution in TFS, the delivery team must configure the complete
Services and Triggers solution in TFS. While configuring the Services or Triggers
solution, proper version of the AX Retail POS version must be chosen (AX 2012
R2)
From the Services or Triggers solution, the project specific solution must be
configured as a branch from the main application. By doing this, we are keeping
the original source code as is in the main solution and keep only the project
specific code in the branch
8-3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
The projects which we are not used for customization from the Retail SDK can be
removed from the TFS branch. In this way, the delivery team will be focused only
on the items they will be modifying and delivering to the customer. The solution
available in the branch should comply with the coding standards of .Net like
FxCop, StyleCop, VS Code analysis and Code metric standards. For detailed
information on these standards please refer the link in the reference section.
Unit Testing
It is usually conducted by the development team. This testing is to verify and
validate that the individual units of source code are fit for use.
Considerations:
Using Test Driven Development (TDD) developer can write unit test cases for
solution before actually writing that code. By writing a test and then writing the
code to make that test pass developers have a much better idea of what the goal
and purpose of the code is. Also, a TDD comprehensive suite of unit tests can be
run at any time to provide feedback that the software is still working. It improves
the quality of code and ensures total code coverage of custom code. The
developer can use Visual T#, NUnit, MS Test, xUnit or any other viable unit test
framework for TDD driven unit testing. For detailed information on the unit
testing please refer the link in the reference section
8-4
Reference
Partial Classes and Methods (C# Programming Guide) http://msdn.microsoft.com/en-us/library/wa80x488(v=VS.100).aspx
AX for Retail: A Better Sample for EFT plug-in (Credit Card processing)
http://blogs.msdn.com/b/axsupport/archive/2012/01/14/ax-for-retail-a-bettersample-for-eft-plug-in-credit-card-processing.aspx
C# coding guidelines
http://msdn.microsoft.com/en-US/library/vstudio/ms229042(v=vs.100).aspx
Guidelines for Test-Driven Development
http://msdn.microsoft.com/en-us/library/aa730844(VS.80).aspx
Test Driven Development
http://msdn.microsoft.com/en-us/library/aa730844(v=vs.80).aspx
Visual Studio 2010: Test Driven Development
http://msdn.microsoft.com/en-us/gg454254
FxCop
http://msdn.microsoft.com/en-US/library/bb429476(v=vs.80).aspx
Code analysis
http://msdn.microsoft.com/en-us/library/3z0aeatx.aspx
StyleCop
http://archive.msdn.microsoft.com/sourceanalysis
Code Metrics:
http://msdn.microsoft.com/en-us/library/bb385914.aspx
8-5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Module Review
Best Practice:
1.
2.
3.
4.
8-6
1.
2.
2.
8-7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
8-8
Objectives
9-1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Logon Extensibility
This lesson provides brief information about the POS Logon extensibility feature
using some external devices or any other mediums.
9-2
2.
3.
Launch POS
4.
The sample provides information on how to extend the logon functionality in POS
to use Biometric devices.
9- 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Biometric Plugin
The below code provides the abstract for implementing the Biometric plugin. We
can extend this code to implement biometric login in POS.
public sealed class BiometricPlugin : IBiometricDevice
{
public event BiometricDeviceDataEventHandler DataReceived;
public event BiometricDeviceStatusEventHandler StatusUpdate;
public void Load()
{
// Init the biometric device
}
public void Unload()
{
// Cleanup
}
public string DeviceName
{
get { return string.Empty; }
}
public string DeviceDescription
{
get { return string.Empty; }
}
public bool IsActive
{
get { return true; }
}
public void BeginEnrollCapture()
{
// Create worker thread for enroll capture and return
}
public void BeginVerifyCapture()
{
// Create worker thread for verify capture and return
}
public void EndCapture()
{
// close the thread.
}
9-4
9- 5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Module Review
Module Review and Takeaways
9-6
LogOn
9- 7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
9-8
Objectives
10 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
POS Skins
Creating a new skin
10 - 2
10 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Click File->Save.
You must now convert your project into an assembly that will be used
by Retail POS. Click File->Create Assembly. You should see a
confirmation dialog similar to the following:
10 - 4
Click the New button and set the POS skin name field to
MyFirstCustomSkin.
Close the POS skins form and with the POS visual profiles form still
open, set the Theme dropdown to MyFirstCustomSkin. Close the
form.
Launch Retail POS and your new skins visualization effects should
display similar to the following image.
10 - 5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Module Review
Tools
DevExpress SkinEditor Tool.
10 - 6
How will you update the new skin created using the tool in POS
How will you update the new skin created using the tool in POS
MODEL ANSWER:
In order for Retail POS to load your new skin, you must place the skin
assembly in the Retail POS runtime folder. Copy the
MyFirstCustomSkin.dll to the Skins folder underneath the Retail POS
runtime directory. Also update the new skin name in Retail->Setup>POS->Profiles->Visual Profiles and run the N-1090 scheduler job.
10 - 7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
10 - 8
11 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Lesson Objectives
11 - 2
ExtendedLogOnForm
ExtendedLogOnScanForm
frmBarcodeSelect
frmDimensions
frmInput
frmPayCash
frmPayCurrency
frmPayCustomerAccount
frmReturnTransaction
LogbookForm
LogOnForm
ManagerAccessForm
RegisterTimeForm
ViewTimeClockEntriesForm
ProductDetailsForm
ProductInformationForm
In the folder where you installed the Retail POS SDK, open the
Microsoft Dynamics AX for Retail POS Plug-ins folder.
2.
Open the Services folder and double-click the Services Visual Studio
solution file.
In this step, you override the LogOnForm form. This form has a
dependency on the ManagerAccessForm.
3.
4.
Add the following code to the OnLoad() method for the first line of
the method to change the back ground color to dark red.
5.
6.
11 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
How to Modify a Form in the Microsoft Dynamics Ax 2012
R2 POS Item Search Form
This topic explains how to add a new column to the existing Item search form
and view that form in the POS user interface (UI). For example, you will add the
column SerachName of the Item in the Item search form. You will fetch this
column value from the ECORESPRODUCT table.
To customize the ItemSearch form, follow these steps.
By default, in the folder where you installed the Retail POS Software Development Kit
(SDK), it will be located at C:\Users\...\Documents\Retail SDK\POS Plug-ins.
1.
Open the Microsoft Dynamics AX for Retail POS Plug-ins folder. For
more information about how to install the Retail SDK, refer to the
installation guide.
2.
Open the Services folder and double-click the Visual Studio solution
file, services.sln.
3.
Open the Services folder and double-click the Services Visual Studio
solution file.
4.
5.
6.
7.
You must add the column in the gridView to appear in the form. For
this include the new column in the range and set the column
properties in InitializeComponent() method.
this.grdView.Columns.AddRange(new
DevExpress.XtraGrid.Columns.GridColumn[] {
this.colItemName,
this.colItemId,
this.colSearchString,
this.colItemPrice,
this.colItemUnitOfMeasure,
this.colItemTaxRate,
this.colItemOwnThirdProduc,
this.colItemRoundTrunc});
11 - 4
8.
Now, modify the Item Search query to include the new column in the
search criteria for filtering and displaying in the GetItemList() method.
9.
Build the project in release mode and replace the Dialog.dll in the
Retail POS\Services\Extension folder. This path is applicable only for
Microsoft Dynamics AX 2012 R2. For later versions use
POS\Extensions.
10. Start the POS and then click the Product search button that is added
in the POS layout. The Item search form should resemble the
following.
11 - 5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
11 - 6
Objectives
12 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Lesson Objectives
Explain how to customize triggers and how the triggers are used.
2.
Browse to the folder where the Retail POS Software Development Kit
(SDK) is installed. By default, it will be located at
C:\Users\...\Documents\Retail SDK\POS Plug-ins\.
3.
Open the Triggers folder and double-click the Triggers Visual Studio
solution file.
DevExpress.Utils.v11.2.dll
o POSProcesses.dll
o System.Windows.Forms.dll
5.
6.
7.
12 - 2
8.
After you build the project, put the assembly in the Retail
POS\Services\Extensions folder. This path applies only to Microsoft
Dynamics AX 2012 R2. For later versions, use POS\Extensions.
9.
Start the POS runtime and perform the Gift card balance operation.
10. After you receive the balance, the dialog box appears with the
customer message that is written in the post process.
12 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
12 - 4
Objectives
13 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Lesson Objectives
2.
Browse to the folder where you installed the Retail POS Software
Development Kit (SDK). By default, this folder will be located at
C:\Users\...\Documents\Retail SDK\POS Plug-ins\.
3.
Open the Services folder and double-click the Services Visual Studio
solution file.
4.
13 - 2
5.
reportLayout.AppendLine(string.Format("Return count{0}",CalculateNegativeTransaction(batch)));
6.
After you do this, build the project and put the assembly in the Retail
POS\Services\Extensions folder. This path applies only to Microsoft
Dynamics AX 2012 R2. For later versions, use POS\Extensions.
7.
Start the POS runtime and perform the Z-report operation to view the
changes in the report.
13 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
13 - 4
Objectives
14 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Start Retail POS. Right-click the Cashier Tasks button and then select
Button Properties. The Configure button form opens.
2.
You can use the Blank Operation param field to send an optional string
parameter. The Operation number and Blank Operation param values combine to
form the method signature of the Blank Operation. In this scenario, set the
Operation number to MyTask and leave the Blank Operation param value to My
Param.
3.
You can use the fields under the Appearance tab on the right-side of
the Configure button form to customize the appearance of the
button. For example, you can set the text value that displays on the
button when Retail POS is started. Change the button name to
MyOperation, as shown in the following image:
14 - 2
Browse to the folder where you installed the Retail POS Software
Development Kit (SDK). By default, it will be located at
C:\Users\...\Documents\Retail SDK\POS Plug-ins\.
2.
Open the Services folder and double-click the Services Visual Studio
solution file.
3.
4.
Right-click the reference node and then click Add reference and
browse for the assemblies POSProcessess in the Retail POS folder and
then select it, and then click OK.
6.
7.
14 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
8.
Click the Cashier Tasks button and then click the MyOperation
button. You will receive the following message in the status panel:
14 - 4
Objectives
15 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
When you create the custom fields, as with the custom fields for till
layout, receipt fields are defined in Headquarters on the Custom
Fields form
(Retail > Setup > POS > Profiles > Custom fields). For this
example, you will create two fields, both of the type
Receipt: TotalQty and TimeScanned.
15 - 2
Browse to Retail > Setup > POS > Receipt formats and then click
the Designer button for any receipt format.
15 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
15 - 4
Note: You did not correctly create the RetailLanguageText record, if something
appears that resembles (22000)??Missing String??.
1.
Find a place to drag the Total Quantity and Time Scanned fields
onto the header section and give each a hard-coded text label. Make
sure that you press the Save button when you are finished.
2.
Run the A-1090 or N-1090 job to push the new receipt to the POS
database.
15 - 5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
4.
Browse to the folder where you installed the Retail POS Software
Development Kit (SDK). By default, it will be located at
C:\Users\...\Documents\Retail SDK\POS Plug-ins\.
5.
Open the Services folder and then double-click the Services Visual
Studio solution file.
6.
15 - 6
7.
To print a value for the custom field, you have to add the field name
to the switch statement.
9.
After this is set up, you must add the following lines to the PreSale()
method:
using LSRetailPosis.Transaction.Line.SaleItem;
[...]
public void PreSale(IPreTriggerResult preTriggerResult, ISaleLineItem
saleLineItem, IPosTransaction posTransaction)
{
SaleLineItem s = (SaleLineItem)saleLineItem;
s.PartnerData.TimeAdded = System.DateTime.Now.ToString("HH:mm:ss");
15 - 7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
10. Now you must read the TimeAdded value when you print sales lines
on the receipt. This is performed in the FormModulation.cs again,
this time in the GetInfoFromSaleLineItem() method.
switch (itemInfo.Variable.ToUpperInvariant().Replace(" ", string.Empty))
{
case "TIMESCANNED": returnValue = saleLine.PartnerData.TimeAdded;
break;
case "TAXID":
returnValue = saleLine.TaxGroupId;
break;
11. Compile the ItemTriggers.dll and Printing.dll and then copy them to
the POS\Services\Extension subfolder in the POS installation. This
path applies only to Microsoft Dynamics AX 2012 R2. For later
versions, use POS\Extensions.
12. Start POS and print a receipt by doing a sale transaction so that you
will able to view the modification in POS.
Similar to this, you can also add custom fields on the following:
15 - 8
Payment Grid
Totals Area
Objectives
16 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
RetailTransactionServiceEx Class
To extend the Real-time service, the methods must meet the following criteria:
The return value must be a container of length two or more. The first
two elements must be a Boolean value that indicates whether the
method call is successful and a String value that you can use for a
comment or error message. The other items in the container can be
of any type. This includes nested containers.
Boolean
date
int
int64
str
guid
Real
2.
Example:
The following example shows a method that takes a customer account number
and returns a greeting message that uses the customers name. For example, if
customer account number 1001 is associated with a customer named Sandy, the
method would return Hello Sandy!
public static container Hello(AccountNum accountNumber)
{
CustTable custTable;
DirPartyTable dirPartyTable;
container result = [false, ''];
16 - 2
Here, you are calling the new method by using the POS BlankOperation.
public void BlankOperation(IBlankOperationInfo operationInfo,
IPosTransaction posTransaction)
{
switch (operationInfo.OperationId)
{
case "MyTask":
try
{
var response =
Application.Instance.TransactionService.InvokeExtension("Hello", "2014");
if (response.Count == 1)
{
LSRetailPosis.POSProcesses.POSFormsManager.ShowPOSStatusPanelText(response
[0] as string);
}
}
catch (CommunicationException ex)
{
LSRetailPosis.POSProcesses.POSFormsManager.ShowPOSStatusPanelText("Request
failed: {0}", ex.Message);
}
operationInfo.OperationHandled = true;
break;
}
}
16 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
After you do this, compile the BlankOperations project and copy the new
assembly to the POS\Services\Extension folder and then start Retail POS. This path
applies only to Microsoft Dynamics AX 2012 R2. For later versions, use
POS\Extensions. Click the Cashier Tasks button and then click the MyTask
button. (Add the MyTask blank operation button if it is not yet added). For more
information, refer to the blank operation extension document for how to add a
custom blank operation button and how to customize this button). If the
account number exists it will display the customer name on the status panel.
To modify the existing methods in transaction service class
(RetailTransactionService), add a new pre-event handler or a post event handler
for that method and write the new method logic in the RetailTransactionServiceEx.
Example:
If a gift card is issued and you want to update a web service, create a new Post
handler and set the class as RetailTransactionServiceEx and the method as
UpdateGiftCardService. UpdateGiftCardService is the new method that is
implemented in the RetailTransactionServiceEx class to update the gift card web
service.
public static void UpdateGiftCardService (XppPrePostArgs _args)
{
// All the gift card arguments can be fetched from the _args parameter
// write your logic to update the service
}
To create a post handler, right-click the giftCardAddTo method, and then select
New Event Handler Subscription.
Now, set the properties shown as follows:
By doing it in this manner, both the existing code and the custom code are
managed separately.
16 - 4
Objectives
Disclaimer
You may copy, alter, adapt, modify or create derivative works of the Dynamics
Payment SDK and this TemplateConnector for the purpose of payment card
processing and use solely with Microsoft Dynamics AX 2012 R2 in your internal
business operations and with valid licenses of Microsoft Dynamics AX 2012 R2.
You will not, and will not permit or authorize any third party to distribute any of
the derivative works of the Payment SDK and this TemplateConnector.
17 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Payment Connector
You can use the payment connector to connect any Microsoft Dynamics channel
to the payment SDK for processing payments. You can also use the payment
connector to connect to different payment devices, such as Hydra.
The payment connector extends from a different interface to achieve the
functionality that is described earlier. Some components of the main interface are
listed as follows:
IPaymentManager
The Microsoft.Dynamics.Retail.PaymentManager.Reference.IPaymentManager is
the interface for all payment devices. It exposes the methods and events for
handling devices.
IPaymentProcessor
The Microsoft.Dynamics.Retail.PaymentSDK.IPaymentProcessor is the interface for
all the payment processing methods. It exposes the methods and events for
handling payments.
ISessionOperation
The Microsoft.Dynamics.Retail.PaymentSDK.ISessionOperation is the interface for
maintaining the session for processing. It exposes the methods and events for
handling sessions.
Some key methods of the payment connector include the following:
Methods
17- 2
Description
Authorize
Refund
Void
2.
3.
4.
On the Signing tab, sign your assembly with a strong name key file.
This is required if you want to deploy your payment connector to the
GAC for the online store.
17 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
17- 4
5.
6.
Click View > Task List to display the task list. The task list shows all
the elements that you should customize for payment.
17 - 5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Any error codes that are returned from the payment provider must be mapped to
the enumerated error codes in the Microsoft.Dynamics.Retail.Payment SDK. The
message that is contained in the error code can be customized as long as the
error code is mapped correctly.
Microsoft Dynamics AX
Copy the connector assembly to the Microsoft Dynamics AX client and the
following server Connectors directories:
17- 6
Retail Stores
In Microsoft Dynamics AX, browse to Retail > Setup > POS > Profiles >
Hardware profiles. Select an existing hardware profile or create a new profile.
Under the EFT Service FastTab, select Payment Connector from the first dropdown list. The payment connector should then be available to select in the second
drop-down list. After you select it, your merchant properties should display:
17 - 7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Accounts Receivable
To use the payment connector in the Microsoft Dynamics AX Accounts
Receivable module, you must browse to Accounts Receivable > Setup >
Payment > Payment services. Create a new payment service and give it a name.
Select the payment connector from the Payment connector drop-down list and
complete the merchant properties:
17- 8
Module Review
Module Review and Takeaways
Deployment
2.
17 - 9
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
17- 10
Objectives
18 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
CreateDatabase Service
The CreateDatabase services project is part of the Retail Software Development Kit
(SDK). The SKD can be used to create and extend the retail database. This lesson
explains how to extend the CreateDatabase project to execute custom SQL
scripts. You will create a custom SQL script and try to execute the script by using
the retail store database utility. After the tool successfully runs, you can verify that
the commands in the custom script are executed and that the commands updated
the POSISINFO table with a current version.
Lesson Objectives
2.
Browse to the folder where you installed the Retail POS SDK. By
default, it will be located in C:\Users\...\Documents\Retail
SDK\POS Plug-ins\. Open the Services\CreateDatabase folder and
double-click the CreateDatabase project file and then add the
following library references from the Retail POS folder:
3.
18 - 2
DataAccess
EntityFramework
POSResources
SystemSettings
Transaction
Microsoft.Dynamcics.Retail.Pos.Contracts
Microsoft.Dynamcics.Retail.Pos.DataEntity
Microsoft.Dynamcics.Retail.Pos.DataManager
Right-click the upgrade folder in the project and then click Add>New Item and in the dialog box. Select Text File and name it
Upgrade6.2.0.1.sql and then click OK. This will create a blank text file
in the Upgrades folder.
Module 18: POS Database Tool Extensibility for Store and Offline Database
4.
Now, copy the following statement into that file and then click the
Save icon.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ExtensionSample](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[StoreNumber] [nvarchar](50) NOT NULL,
[StoreName] [nvarchar](50) NULL,
CONSTRAINT [PK_ExtensionSample] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
5.
<POSISUPGRADES>
<UPGRADEVERSION>6.2.0.1</UPGRADEVERSION>
<UPGRADESCRIPT>Upgrade6.2.0.1.sql</UPGRADESCRIPT>
</POSISUPGRADES>
2.19 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<!-- Upgrade Id : AppMajor.AppMinor.DbVersion.ReservedForPartners -->
<POSISUPGRADES>
<UPGRADEVERSION>6.2.0.0</UPGRADEVERSION>
<UPGRADESCRIPT>Upgrade6.2.0.0.sql</UPGRADESCRIPT>
</POSISUPGRADES>
<POSISUPGRADES>
<UPGRADEVERSION>6.2.0.1</UPGRADEVERSION>
<UPGRADESCRIPT>Upgrade6.2.0.1.sql</UPGRADESCRIPT>
</POSISUPGRADES>
</NewDataSet>
18 - 4
6.
7.
Start the RetailDatabaseUtility and enter the store server and the
offline server name. Also enter the database details together with the
Store, terminal and Datatarea id and then click continue. In the
dialog box, you can view the customer script that is being executed
and the ExtensionSample custom table that is being created in both
the store and the offline database.
Objectives
Explain the testing considerations for several testing types for the POS
customization.
19 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Testing
Types of Testing
Unit Testing
Unit tests are written by developers and run under a unit testing framework, such
as Microsoft Visual Studio Team System or NUnit. Unit tests isolate and verify
discrete units of program logic. They isolate the logic by replacing dependencies
on the run-time environment, such as SharePoint, with test-provided substitutes.
Isolation lets unit tests run quickly, and developers can run unit tests frequently.
Acceptance Testing
Acceptance tests consist of multiple steps that represent realistic usage scenarios
for the whole application. These tests verify that an application meets the
requirements of the intended users. Their scope includes usability, functional
correctness, and performance. Generally, test engineers create these tests.
Configuration Testing
This is usually performed by the performance testing engineers. The objective is to
determine minimal and optimal configuration of hardware and software, and the
effect of adding or modifying configurations.
Functional Testing
This is performed by functional and, or testing teams. This is a type of black box
testing that bases its test cases on the specifications of the Microsoft Dynamics Ax
POS implementation under test.
Integration Testing
This is usually conducted by testing teams. The Microsoft Dynamics AX POS
implementation usually involves integrations with several modules, and external
devices, such as a magnetic strip reader MSR, and the bar code scanner
components, such as payment gateway. Integration testing is performed by
combining all the modules, devices and external components and testing them as
a group.
Performance Testing
This is usually conducted by the performance engineer. It involves Functional
testing that is conducted to evaluate the compliance of a system or component
with specified performance requirements.
19 - 2
Hardware Testing
This tests the hardware devices that are connected to a POS application that has
different configurations. Before testing the device with POS, you must test all the
hardware devices with the test utility that is provided by the device manufacturer
to make sure that the devices are working correctly.
19 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Printers
The testing of printers verifies whether the correct information that is related to
an item is printed on various receipts that are generated at the printer. The correct
information that is related to the customer, such as the ordered items and the
total should be printed on the receipts.
Weighing Scale
The testing of scales are used to weigh items sold by weight. The scale should
display the exact quantity of an item that is put on the scale to weigh and its price
should be displayed according to the weight of the item.
Cash Drawer
The testing of the cash drawer checks whether the cash drawer opens when an
order is submitted or when a check is settled.
Line Display
The testing of the tower displays the ordered item and its price. This helps the
customer to view the item he or she ordered. It also displays the due amount,
tendered amount and the change that is given to the customer. A tower is tested
against this information to check whether correct information is displayed on the
tower.
Keyboard
The testing of the POS keyboard checks whether the correct keyed data is
displayed and processed.
EFT Testing
Before the EFT solution is deployed in production, it should be tested several
times by using the test emulator or the test Portable Electronic Device (PED) that
is provided by the payment service provider. It should also display the PCI
complaint.
19 - 4
Challenges
Multiple Configurations
Testing a POS application that has different settings and configurations is a
cumbersome task. Test cases should be designed that include each scenario (valid
or invalid) in detail. Therefore, a significant budget should be put into testing of
such applications to prevent any major issues at the customer end.
Peripheral Issues
The peripheral issues can be related to devices that are connected to a POS, such
as bar code scanners, scales, printers, towers and cash drawers.
Complex Interfaces
Integration of the POS system involves several interconnected systems and thirdparty elements. Systematic test design techniques are followed to reduce the
complexity of interfaces.
Upgrades
Rapid technological advancements are necessary for frequent hardware and
software upgrades that require more infrastructure.
PCI Compliance
Care must be taken to implement the PCI-compliant, tamper-proof infrastructure
at all POS terminals to protect cardholder data and identity.
19 - 5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Testing Considerations
Testing considerations include the following:
19 - 6
End to end functional testing (smoke testing) after all the modules are
integrated
Load testing for all terminals for each store server and for each store
server for every real-time server
Data volumes
UI Testing Considerations
Ease of usage
19 - 7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Module Review
Module Review and Takeaways
19 - 8
1.
2.
-te
2.
19 - 9
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
19 - 10
Objectives
Explain the steps that are required for the retail hotfix or for the
update deployment.
20 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Deployment Planning
This lesson provides information about the planning that is required for the POS
deployment.
Deployment Components
The types of computers that are used in a typical Microsoft Dynamics AX 2012 R2
POS deployment are included in the following table:
Deployment location
Each Store
Type of computers
Database Server
POS Registers
CDX: Synch Service and Real-time service
20 - 2
2.
All instances of these applications must be updated to the same version. Partly
updated environments are not supported. It is likely that deployed fixes will not
be fully available until all components in an environment are running the same
versions.
Updates for retail environments can be either binary or application updates.
Application updates are installed the same as other Microsoft Dynamics AX
application updates, by installing to a database server, and then recompiling.
Only binary updates require additional actions. You must synchronize your
databases with headquarters, back up the database, install binary updates to nondatabase and database components, and then if you have customized Retail POS,
you must re-merge your code changes to services and triggers, compile, and redeploy.
Before you deploy the POS customized libraries, make a backup of the existing
Retail POS folder and then copy the custom libraries. Copy the customized
services or triggers library to POS\Extension.
For more information about the retail general deployment, refer to the Deploy
Retail POS and Deploy Retail POS Updates.
20 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Locate where you extracted the files for the update, and then doubleclick AxUpdate.exe.
2.
You do not have to restart the Application Object Server (AOS) after you install
the binary retail components.
20 - 4
4.
Click Start > All Programs > Microsoft Dynamics AX > Retail
Database Utility > Retail Database Utility to open the Retail POS
configuration form.
2.
Verify the values for the store database and then click Continue.
20 - 5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Module Review
Module Review and Takeaways
20 - 6
1.
What are the areas that should be considered to merge the POS code hotfix?
2.
20 - 7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
20 - 8
Objectives
21 - 1
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Exercise 1: Blank Operation Extensibility
Blank Operations enable you to extend Microsoft Dynamics AX for Retail POS by
adding custom logic to the Retail POS register buttons. In the Retail POS register
design layout you can add any number of blank operation button and specify the
operations information for each button. Later in this guide we will see how to add
blank operation and specify the operation information.
Exercise Scenario
We will add an item to POS transaction and the get the description of the item
and try to search the item description in the Web browser by opening the internet
explorer with the search text (item description)
2.
3.
Detailed Steps
1.
b.
Open Retail POS Plug-ins from the folder where you installed the
Retail POS SDK. By default it will be C:\Users\...\Documents\Retail
SDK\POS Plug-ins\.For more information about how to install
Retail POS Plug-ins, see Install the Retail SDK.
c.
d.
e.
Right click the reference node and click Add reference and
browse for the assemblies POSProcessess in Retail POS folder and
select it and click ok.
f.
g.
Open the BlankOperation.cs file and add the below line in the
namespace section
using System;
21 - 2
i.
j.
21 - 3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
2.
3.
i.
ii.
Password: 123
b.
If it is first time log on to POS, then POS will display the Shift
form, in that please click "Add a new Shift".
c.
d.
e.
21 - 4
Launch Retail POS by clicking the Retail POS on the start page,
and login to POS using the below operator id and password:
Exercise Scenario
We want to prompt the cashier for loyalty card request from the customer after
the first item added to transaction
Detailed Steps
1.
b.
Open Retail POS Plug-ins from the folder where you installed the
Retail POS SDK. By default it will be C:\Users\...\Documents\Retail
SDK\POS Plug-ins\.For more information about how to install
Retail POS Plug-ins, see Install the Retail SDK.
c.
d.
e.
DevExpress.Utils.v11.2.dll
ii.
POSProcesses.dll
iii. System.Windows.Forms.dll
iv. Microsoft.Dynamics.Retail.Pos.SystemCore
v.
Transaction
21 - 5
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
f.
g.
h.
Add the following code below the namespace section to use the
referenced libraries as shown in the below code:
Namespace Microsoft.Dynamics.Retail.Pos.ItemTriggers
{
using System.Windows.Forms;
using Microsoft.Dynamics.Retail.Pos.SystemCore;
using LSRetailPosis.Transaction;
using LSRetailPosis.POSProcesses;
i.
j.
k.
21 - 6
m. Launch Retail POS by clicking the Retail POS on the start page,
and login to POS using the below operator id and password:
i.
ii.
Password: 123
n.
If it is first time log on to POS, then POS will display the Shift
form, in that please click "Add a new Shift".
o.
p.
The system will prompt the operator for adding the loyalty card
to transaction.
Results
Popup will be shown to the POS operator for requesting loyalty card request.
21 - 7
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Task 1: Override the discount amount defined in functionality profile
High Level Steps
1.
Detailed Steps
1.
b.
Open Retail POS Plug-ins from the folder where you installed the
Retail POS SDK. By default it will be C:\Users\...\Documents\Retail
SDK\POS Plug-ins\.For more information about how to install
Retail POS Plug-ins, see Install the Retail SDK.
c.
d.
e.
f.
g.
i.
Microsoft.Practices.Prism.Interactivity
ii.
Microsoft.Dynamics.Retail.Notification.Contracts
Open the Discount.cs file and add the below lines in the
namespace section as shown below:
namespace Microsoft.Dynamics.Retail.Pos.DiscountService
using Microsoft.Practices.Prism.Interactivity.InteractionRequest;
using Microsoft.Dynamics.Retail.Notification.Contracts;
h.
21 - 8
j.
k.
21 - 9
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
maximumDiscountPct.ToString("n2")); //The discount amount is too high. The
discount percentage limit is set to xxxx %.
using (frmMessage dialog = new frmMessage(message,
MessageBoxButtons.OK, MessageBoxIcon.Information))
{
POSFormsManager.ShowPOSForm(dialog);
}
}
}
return returnValue;
If the discount amount is greater than maximum value we are asking for the
manager confirmation. If the confirmation is true then we are allowing for the
discount by passing the standard functionality.
l.
21 - 10
Launch Retail POS by clicking the Retail POS on the start page,
and login to POS using the below operator id and password:
i.
ii.
Password: 123
o.
If it is first time log on to POS, then POS will display the Shift
form, in that please click "Add a new Shift".
p.
q.
Next increase the item quantity such that the final price of the item is
greater than 9001. We can increase the quantity by clicking the
following buttons in the POS layout(Sales->Tasks->Edit line->Set
quantity)
After that click the Discounts button and select the Line discount
amount and try to give discount amount of 9001 and click OK, next
system will ask for the manager log on information to authorize the
discount.
ii.
Password: 123
s.
Next system will pop up a reason code selection form, in that select
any reason code (The Reason code form will pop up only if it is
configured in HQ).
t.
If it is success then the system will give the discount else it will
through the error message.
Results
Overrides the maximum amount discount defined in the functionality profile.
Exercise Scenario
The existing inventory status functionality will allow us to view the item status of
the stores which belong to the same legal entity. We will modify the query in retail
transaction service class to fetch the inventory status of items across all the legal
entities.
21 - 11
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Detailed Steps
1.
b.
Open AX from the Desktop icon and then click Ctrl+D to open
development workspace
c.
d.
e.
f.
In this method we will modify the query to search across all legal
entities by including the cross company query and Change
company functionality to fetch across all legal entities.
g.
output = [true,''];
inventLocation;
availPhysical;
try
{
//New line added for Extending
while select crossCompany InventLocation from retailStoreTable
join omOperatingUnitID from retailChannelTable
where retailChannelTable.RecId == retailStoreTable.RecId
join Name from dirPartyTable
where dirPartyTable.RecId ==
retailChannelTable.omOperatingUnitID
join InventSiteId, InventLocationId from inventLocation
where inventLocation.InventLocationId ==
retailStoreTable.InventLocation
{
inventDim.InventSizeId
=
inventDimCombination.inventDim().InventSizeId;
inventDim.InventColorId
=
inventDimCombination.inventDim().InventColorId;
inventDim.InventStyleId
=
inventDimCombination.inventDim().InventStyleId;
inventDim.ConfigId
=
inventDimCombination.inventDim().ConfigId;
21 - 12
h.
i.
Launch Retail POS by clicking the Retail POS on the start page,
and login to POS using the below operator id and password:
i.
ii.
Password: 123
j.
If it is first time log on to POS, then POS will display the Shift
form, in that please click "Add a new Shift".
k.
l.
The system will display the inventory status across all legal
entities.
Results
View the inventory status across all the stores.
21 - 13
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
21 - 14
INTRODUCTION
Training is an important component of maintaining the value of a Microsoft
Dynamics investment. Quality training from industry experts keeps you up-todate and helps you develop the skills necessary for fully maximizing the value of
your solution. Microsoft Dynamics provides different kinds of training to meet
everyones needs, from online training, classroom training, or training materials.
Select the training type that will best help you stay ahead of the competition.
Online Training
Online training delivers convenient, detailed training in the comfort of your own
home or office. Online training provides immediate access to training 24 hours a
day. It is perfect for the customer who does not have the time or budget to travel.
Online training options combine the efficiency of online training with the
thorough product coverage of classroom training.
Classroom Training
Classroom training provides, comprehensive learning through hands-on
interaction. From demonstrations to presentations to classroom activities, you
receive practical experience with instruction from our certified staff of experts.
Training Materials
Training materials help you learn at your own pace, in your own time, with
information-packed training manuals. The many training manuals features many
tips, tricks, and insights that you can reference continuously.
0-1
Microsoft Official Training Materials for Microsoft Dynamics
Your use of this content is subject to your current services agreement
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
Lab
Within the Microsoft Dynamics training materials, you will find labs. These labs are
typically offered in two levels to accommodate each students variety of
knowledge and expertise. We suggest that you try the High level steps first. If you
need help completing the task, look to the information in the Detailed steps.
Detailed steps
Detailed steps are geared toward new users who require detailed instructions and
explanations to complete the lab. Detailed steps guide you through the whole
task. This includes navigation.
0-2
Introduction
Student Objectives
What do you hope to learn by participating in this course?
List three main objectives here.
1.
2.
3.
0-3
Microsoft Dynamics AX 2012 R2 For Retail in Brick and Mortar Stores Development and Customization
0-4