Documente Academic
Documente Profesional
Documente Cultură
This courseware is provided as-is. Information and views expressed in this courseware, including URL and
other Internet Web site references, may change without notice.
Unless otherwise noted, the examples depicted herein are provided for illustration only and are fictitious. No
real association or connection is intended or should be inferred.
This courseware does not provide you with any legal rights to any intellectual property in any Microsoft
product. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the
rights under copyright, no part of this courseware may be reproduced, stored in or introduced into a retrieval
system, or transmitted in any form or by any means or for any purpose, without the express written
permission of Microsoft Corporation.
Copyright 2012 Microsoft Corporation. All rights reserved.
Microsoft, Microsoft Dynamics, Microsoft PowerPoint, Microsoft SQL Server data management
software and Microsoft Dynamics NAV are trademarks of the Microsoft group of companies. All other
trademarks are property of their respective owners.
DEFINITIONS.
a. Authorized Learning Center means a Microsoft IT Academy Program Member, Microsoft Learning
Competency Member, or such other entity as Microsoft may designate from time to time.
b. Authorized Training Session means the instructor-led training class using Microsoft Instructor-Led
Courseware conducted by a Trainer at or through an Authorized Learning Center.
c.
Classroom Device means one (1) dedicated, secure computer that an Authorized Learning Center owns
or controls that is located at an Authorized Learning Centers training facilities that meets or exceeds the
hardware level specified for the particular Microsoft Instructor-Led Courseware.
d. End User means an individual who is (i) duly enrolled in and attending an Authorized Training Session
or Private Training Session, (ii) an employee of a MPN Member, or (iii) a Microsoft full-time employee.
e. Licensed Content means the content accompanying this agreement which may include the Microsoft
Instructor-Led Courseware or Trainer Content.
f.
Microsoft Certified Trainer or MCT means an individual who is (i) engaged to teach a training session
to End Users on behalf of an Authorized Learning Center or MPN Member, and (ii) currently certified as a
Microsoft Certified Trainer under the Microsoft Certification Program.
g. Microsoft Instructor-Led Courseware means the Microsoft-branded instructor-led training course that
educates IT professionals and developers on Microsoft technologies. A Microsoft Instructor-Led
Courseware title may be branded as MOC, Microsoft Dynamics or Microsoft Business Group courseware.
h. Microsoft IT Academy Program Member means an active member of the Microsoft IT Academy
Program.
i.
Microsoft Learning Competency Member means an active member of the Microsoft Partner Network
program in good standing that currently holds the Learning Competency status.
j.
MOC means the Official Microsoft Learning Product instructor-led courseware known as Microsoft
Official Course that educates IT professionals and developers on Microsoft technologies.
k.
MPN Member means an active silver or gold-level Microsoft Partner Network program member in good
standing.
l.
Personal Device means one (1) personal computer, device, workstation or other digital electronic device
that you personally own or control that meets or exceeds the hardware level specified for the particular
Microsoft Instructor-Led Courseware.
m. Private Training Session means the instructor-led training classes provided by MPN Members for
corporate customers to teach a predefined learning objective using Microsoft Instructor-Led Courseware.
These classes are not advertised or promoted to the general public and class attendance is restricted to
individuals employed by or contracted by the corporate customer.
n. Trainer means (i) an academically accredited educator engaged by a Microsoft IT Academy Program
Member to teach an Authorized Training Session, and/or (ii) a MCT.
o. Trainer Content means the trainer version of the Microsoft Instructor-Led Courseware and additional
supplemental content designated solely for Trainers use to teach a training session using the Microsoft
Instructor-Led Courseware. Trainer Content may include Microsoft PowerPoint presentations, trainer
preparation guide, train the trainer materials, Microsoft One Note packs, classroom setup guide and Prerelease course feedback form. To clarify, Trainer Content does not include any software, virtual hard
disks or virtual machines.
2.
USE RIGHTS. The Licensed Content is licensed not sold. The Licensed Content is licensed on a one copy
per user basis, such that you must acquire a license for each individual that accesses or uses the Licensed
Content.
2.1
Below are five separate sets of use rights. Only one set of rights apply to you.
a. If you are a Microsoft IT Academy Program Member:
i. Each license acquired on behalf of yourself may only be used to review one (1) copy of the Microsoft
Instructor-Led Courseware in the form provided to you. If the Microsoft Instructor-Led Courseware is
in digital format, you may install one (1) copy on up to three (3) Personal Devices. You may not
install the Microsoft Instructor-Led Courseware on a device you do not own or control.
ii. For each license you acquire on behalf of an End User or Trainer, you may either:
1. distribute one (1) hard copy version of the Microsoft Instructor-Led Courseware to one (1) End
User who is enrolled in the Authorized Training Session, and only immediately prior to the
commencement of the Authorized Training Session that is the subject matter of the Microsoft
Instructor-Led Courseware being provided, or
2. provide one (1) End User with the unique redemption code and instructions on how they can
access one (1) digital version of the Microsoft Instructor-Led Courseware, or
3. provide one (1) Trainer with the unique redemption code and instructions on how they can
access one (1) Trainer Content,
provided you comply with the following:
iii. you will only provide access to the Licensed Content to those individuals who have acquired a valid
license to the Licensed Content,
iv. you will ensure each End User attending an Authorized Training Session has their own valid licensed
copy of the Microsoft Instructor-Led Courseware that is the subject of the Authorized Training
Session,
v. you will ensure that each End User provided with the hard-copy version of the Microsoft InstructorLed Courseware will be presented with a copy of this agreement and each End User will agree that
their use of the Microsoft Instructor-Led Courseware will be subject to the terms in this agreement
prior to providing them with the Microsoft Instructor-Led Courseware. Each individual will be required
to denote their acceptance of this agreement in a manner that is enforceable under local law prior to
their accessing the Microsoft Instructor-Led Courseware,
vi. you will ensure that each Trainer teaching an Authorized Training Session has their own valid
licensed copy of the Trainer Content that is the subject of the Authorized Training Session,
vii. you will only use qualified Trainers who have in-depth knowledge of and experience with the
Microsoft technology that is the subject of the Microsoft Instructor-Led Courseware being taught for
all your Authorized Training Sessions,
viii. you will only deliver a maximum of 15 hours of training per week for each Authorized Training
Session that uses a MOC title, and
ix. you acknowledge that Trainers that are not MCTs will not have access to all of the trainer resources
for the Microsoft Instructor-Led Courseware.
b. If you are a Microsoft Learning Competency Member:
i. Each license acquired on behalf of yourself may only be used to review one (1) copy of the Microsoft
Instructor-Led Courseware in the form provided to you. If the Microsoft Instructor-Led Courseware is
in digital format, you may install one (1) copy on up to three (3) Personal Devices. You may not
install the Microsoft Instructor-Led Courseware on a device you do not own or control.
ii. For each license you acquire on behalf of an End User or Trainer, you may either:
1. distribute one (1) hard copy version of the Microsoft Instructor-Led Courseware to one (1) End
User attending the Authorized Training Session and only immediately prior to the
commencement of the Authorized Training Session that is the subject matter of the Microsoft
Instructor-Led Courseware provided, or
2. provide one (1) End User attending the Authorized Training Session with the unique redemption
code and instructions on how they can access one (1) digital version of the Microsoft InstructorLed Courseware, or
3. you will provide one (1) Trainer with the unique redemption code and instructions on how they
can access one (1) Trainer Content,
provided you comply with the following:
iii. you will only provide access to the Licensed Content to those individuals who have acquired a valid
license to the Licensed Content,
iv. you will ensure that each End User attending an Authorized Training Session has their own valid
licensed copy of the Microsoft Instructor-Led Courseware that is the subject of the Authorized
Training Session,
v. you will ensure that each End User provided with a hard-copy version of the Microsoft Instructor-Led
Courseware will be presented with a copy of this agreement and each End User will agree that their
use of the Microsoft Instructor-Led Courseware will be subject to the terms in this agreement prior to
providing them with the Microsoft Instructor-Led Courseware. Each individual will be required to
denote their acceptance of this agreement in a manner that is enforceable under local law prior to
their accessing the Microsoft Instructor-Led Courseware,
vi. you will ensure that each Trainer teaching an Authorized Training Session has their own valid
licensed copy of the Trainer Content that is the subject of the Authorized Training Session,
vii. you will only use qualified Trainers who hold the applicable Microsoft Certification credential that is
the subject of the Microsoft Instructor-Led Courseware being taught for your Authorized Training
Sessions,
viii. you will only use qualified MCTs who also hold the applicable Microsoft Certification credential that is
the subject of the MOC title being taught for all your Authorized Training Sessions using MOC,
ix. you will only provide access to the Microsoft Instructor-Led Courseware to End Users, and
x. you will only provide access to the Trainer Content to Trainers.
c.
ii.
You may customize the written portions of the Trainer Content that are logically associated with
instruction of a training session in accordance with the most recent version of the MCT agreement.
If you elect to exercise the foregoing rights, you agree to comply with the following: (i)
customizations may only be used for teaching Authorized Training Sessions and Private Training
Sessions, and (ii) all customizations will comply with this agreement. For clarity, any use of
customize refers only to changing the order of slides and content, and/or not using all the slides or
content, it does not mean changing or modifying any slide or content.
2.2 Separation of Components. The Licensed Content is licensed as a single unit and you may not
separate their components and install them on different devices.
2.3 Redistribution of Licensed Content. Except as expressly provided in the use rights above, you may
not distribute any Licensed Content or any portion thereof (including any permitted modifications) to any
third parties without the express written permission of Microsoft.
2.4 Third Party Programs and Services. The Licensed Content may contain third party programs or
services. These license terms will apply to your use of those third party programs or services, unless other
terms accompany those programs and services.
2.5 Additional Terms. Some Licensed Content may contain components with additional terms,
conditions, and licenses regarding its use. Any non-conflicting terms in those conditions and licenses also
apply to your use of that respective component and supplements the terms described in this agreement.
3.
Pre-release Term. If you are an Microsoft IT Academy Program Member, Microsoft Learning
Competency Member, MPN Member or Trainer, you will cease using all copies of the Licensed Content on
the Pre-release technology upon (i) the date which Microsoft informs you is the end date for using the
Licensed Content on the Pre-release technology, or (ii) sixty (60) days after the commercial release of the
technology that is the subject of the Licensed Content, whichever is earliest (Pre-release term).
Upon expiration or termination of the Pre-release term, you will irretrievably delete and destroy all copies
of the Licensed Content in your possession or under your control.
4.
SCOPE OF LICENSE. The Licensed Content is licensed, not sold. This agreement only gives you some
rights to use the Licensed Content. Microsoft reserves all other rights. Unless applicable law gives you more
rights despite this limitation, you may use the Licensed Content only as expressly permitted in this
agreement. In doing so, you must comply with any technical limitations in the Licensed Content that only
allows you to use it in certain ways. Except as expressly permitted in this agreement, you may not:
access or allow any individual to access the Licensed Content if they have not acquired a valid license
for the Licensed Content,
alter, remove or obscure any copyright or other protective notices (including watermarks), branding
or identifications contained in the Licensed Content,
publicly display, or make the Licensed Content available for others to access or use,
copy, print, install, sell, publish, transmit, lend, adapt, reuse, link to or post, make available or
distribute the Licensed Content to any third party,
reverse engineer, decompile, remove or otherwise thwart any protections or disassemble the
Licensed Content except and only to the extent that applicable law expressly permits, despite this
limitation.
5. RESERVATION OF RIGHTS AND OWNERSHIP. Microsoft reserves all rights not expressly granted to
you in this agreement. The Licensed Content is protected by copyright and other intellectual property laws
and treaties. Microsoft or its suppliers own the title, copyright, and other intellectual property rights in the
Licensed Content.
6.
EXPORT RESTRICTIONS. The Licensed Content is subject to United States export laws and regulations.
You must comply with all domestic and international export laws and regulations that apply to the Licensed
Content. These laws include restrictions on destinations, end users and end use. For additional information,
see www.microsoft.com/exporting.
7.
SUPPORT SERVICES. Because the Licensed Content is as is, we may not provide support services for it.
8.
TERMINATION. Without prejudice to any other rights, Microsoft may terminate this agreement if you fail
to comply with the terms and conditions of this agreement. Upon termination of this agreement for any
reason, you will immediately stop all use of and delete and destroy all copies of the Licensed Content in
your possession or under your control.
9.
LINKS TO THIRD PARTY SITES. You may link to third party sites through the use of the Licensed
Content. The third party sites are not under the control of Microsoft, and Microsoft is not responsible for
the contents of any third party sites, any links contained in third party sites, or any changes or updates to
third party sites. Microsoft is not responsible for webcasting or any other form of transmission received
from any third party sites. Microsoft is providing these links to third party sites to you only as a
convenience, and the inclusion of any link does not imply an endorsement by Microsoft of the third party
site.
10.
ENTIRE AGREEMENT. This agreement, and any additional terms for the Trainer Content, updates and
supplements are the entire agreement for the Licensed Content, updates and supplements.
11.
APPLICABLE LAW.
a. United States. If you acquired the Licensed Content in the United States, Washington state law governs
the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws
principles. The laws of the state where you live govern all other claims, including claims under state
consumer protection laws, unfair competition laws, and in tort.
b. Outside the United States. If you acquired the Licensed Content in any other country, the laws of that
country apply.
12.
LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws
of your country. You may also have rights with respect to the party from whom you acquired the Licensed
Content. This agreement does not change your rights under the laws of your country if the laws of your
country do not permit it to do so.
13.
14.
LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM
MICROSOFT, ITS RESPECTIVE AFFILIATES AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP
TO US$5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL,
LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
This limitation applies to
o
anything related to the Licensed Content, services, content (including code) on third party Internet
sites or third-party programs; and
o
claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence,
or other tort to the extent permitted by applicable law.
It also applies even if Microsoft knew or should have known about the possibility of the damages. The
above limitation or exclusion may not apply to you because your country may not allow the exclusion or
limitation of incidental, consequential or other damages.
Please note: As this Licensed Content is distributed in Quebec, Canada, some of the clauses in this
agreement are provided below in French.
Remarque : Ce le contenu sous licence tant distribu au Qubec, Canada, certaines des clauses
dans ce contrat sont fournies ci-dessous en franais.
EXONRATION DE GARANTIE. Le contenu sous licence vis par une licence est offert tel quel . Toute
utilisation de ce contenu sous licence est votre seule risque et pril. Microsoft naccorde aucune autre garantie
expresse. Vous pouvez bnficier de droits additionnels en vertu du droit local sur la protection dues
consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties
implicites de qualit marchande, dadquation un usage particulier et dabsence de contrefaon sont exclues.
LIMITATION DES DOMMAGES-INTRTS ET EXCLUSION DE RESPONSABILIT POUR LES
DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages
directs uniquement hauteur de 5,00 $ US. Vous ne pouvez prtendre aucune indemnisation pour les autres
dommages, y compris les dommages spciaux, indirects ou accessoires et pertes de bnfices.
Cette limitation concerne:
tout ce qui est reli au le contenu sous licence, aux services ou au contenu (y compris le code)
figurant sur des sites Internet tiers ou dans des programmes tiers; et.
les rclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit
stricte, de ngligence ou dune autre faute dans la limite autorise par la loi en vigueur.
Elle sapplique galement, mme si Microsoft connaissait ou devrait connatre lventualit dun tel dommage. Si
votre pays nautorise pas lexclusion ou la limitation de responsabilit pour les dommages indirects, accessoires
ou de quelque nature que ce soit, il se peut que la limitation ou lexclusion ci-dessus ne sappliquera pas votre
gard.
EFFET JURIDIQUE. Le prsent contrat dcrit certains droits juridiques. Vous pourriez avoir dautres droits
prvus par les lois de votre pays. Le prsent contrat ne modifie pas les droits que vous confrent les lois de votre
pays si celles-ci ne le permettent pas.
Revised September 2012
Objectives
Introduction
Course objectives
Prerequisites
Technical overview
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.
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.
Student Objectives
What do you hope to learn by participating in this course?
List three main objectives here.
1.
2.
3.
Course Objectives
The main objective of this course on Microsoft Dynamics AX 2012 R3 for Retail in Brick and Mortar Stores
Customization and Extensibility is to understand the following:
Introduction
b.
Course objectives
c.
Prerequisites
b.
c.
POS Skins
d. Services Extensibility
e.
f.
i.
b.
Retail POS - Fixed POS Terminal that uses a Windows Forms based touch
User Interface (UI).
Modern POS - Windows 8 based POS that is created by using HTML5
development.
Tasks are performed by using a POS register and the graphical UI. Both are easy
to use and can be set up to meet the requirements of many industries, such as
grocery, fashion and specialty retailers.
Lesson Objectives
Discuss the Microsoft Dynamics POS Overview.
Retail POS
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.
Modern POS
Microsoft Dynamics AX 2012 R3 includes Modern POS, a point-of-sale app for
PCs, tablets, and phones. Sales staff can process sales transactions, customer
orders, and perform daily operations and inventory management with mobile
devices anywhere in the store, as well as at PC-based registers.
The Modern POS app running on a device is a thin client. It must connect to
Microsoft Dynamics AX Retail Server. Retail Server performs the business logic and
processing for Modern POS.
Modern POS is a smaller POS installation that is primarily designed for Windows 8.
Modern POS mostly uses Retail Server for the Master data and RTS for calls.
Disclaimer: The Retail Modern POS is comprised of pre-release components. All
pre-release features and functionality are preliminary based on current
expectations, and are subject to change without notice.
Channel Database
Each store must have its own database, and a single database is used for multiple
registers, this is known as the channel Database. 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.
Module Review
Module Review and Takeaways
2.
3.
4.
Describe any two operations that cannot be performed when the POS store
database is offline.
Each store must have its own database, and a single database is used
for multiple registers, this is known as the channel Database.
8.
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.
9.
No. Only the store database can be shared across multiple terminals.
Retail POS
Modern POS (MPOS)
Note: The Retail Modern POS is comprised of pre-release components. All prerelease features and functionality are preliminary based on current expectations,
and are subject to change without notice.
Objectives
Describe the technical framework and capabilities of Retail POS and Modern POS.
Retail POS
Capabilities
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
When the store database is offline, the following operations cannot be performed:
Close a shift
Blind-close a shift
When the connectivity to HQ is not working (CDX: Real time service connection
down), the following operations cannot be performed:
a.
Inventory Lookup
b.
c.
Loyalty Operations
Lesson Objectives
Customize or extend Microsoft Dynamics AX 2012 Retail 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,
and includes the following 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 (http://technet.microsoft.com/enus/library/hh771575.aspx )
POS Clients Contains the code for the Windows Modern Point of
Sale Application and Windows Phone Point of Sale Application,
together with native code for Peripherals.
Online Channel Contains the code that you can use to extend the
data flow between online retail channels like e-commerce.
These services are a collection of the .NET Framework assemblies that implement
public interfaces. Refer to the POS Extensibility Interface Definition course
document for more information.
Retail POS loads the services at run time and invokes their functionality through
these interfaces. Because Retail POS Plug-ins is included with the C# source code
for these assemblies, you can customize or replace services and triggers to extend
features in Retail POS, such as calculating taxes.
By default, Retail POS Plug-ins is installed in the following directory
C:\Users\...\Documents\Retail SDK\POS Plug-ins\.
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
Operations
An operation is an activity that occurs in Retail POS. Operations can be a single
step or multiple steps. 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 that are raised by Retail POS that you can use to insert custom
code before or after operations. There are two types of triggers:
Pre-triggers
Post-triggers
Development Requirements
Some development requirements for Retail POS include the following:
Modern POS
Capabilities
Modern POS includes the following capabilities:
Supports most of the capabilities that are provided by Retail POS except
for the limitations of hardware capabilities to interact with Windows 8
Framework.
There is no offline capability and uses RTS for order creation.
Supports the hardware station feature that can be used to remote print
and uses hardware that is not attached directly to the POS computer.
Source Code
Unlike Retail POS, the complete Source code for Modern POS is available with
Retail SDK. This lets you customize Modern POS.
Open Framework
Information about the open framework includes the following:
Modern POS uses the Rest API that is provided by Retail Server and
also the data that is received is in the ODATA format that is a
Universal Format that is used by Microsoft and other third-party
software vendors. More information about ODATA can be found at
http://www.odata.org/.
The Rest API is fast becoming the most used standard for the
communication between the Server and clients. The Retail server
component uses these universally accepted components and this
helps make the customization easier.
Development Requirements
Development requirements include the following:
Lesson Objectives
Explain the real-time service functionality of Microsoft Dynamics AX 2012 POS.
Module Review
Module Review and Takeaways
Elements discussed in this module include a brief description of how to
extend Retail POS, the Retail POS Plug-ins operations, and the services,
triggers and real-time services.
Tools
Tools to use in Retail POS include the following:
2.
3.
4.
5.
Services contains the core business logic and triggers are events that
are raised by Retail POS that let you insert custom code before or
after operations.
6.
7.
The Rest API is fast becoming the most used standard for the
communication between the Server and clients. The Retail server
component uses these universally accepted components and this
helps make the customization easier.
Lesson Objectives
03 - 2
2.
3.
4.
5.
6.
03 - 3
03 - 4
2.
3.
4.
Click File->Save.
5.
Convert the 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:
03 - 5
03 - 6
1.
2.
Right-click Theme on the drop-down menu, and then click View Details.
3.
Click the New button, and then set the Retail POS skin name field to
MyFirstCustomSkin.
4.
Close the Retail POS skins form, and then with the Retail POS visual
profiles form open, set Theme on the drop-down menu to
MyFirstCustomSkin.
5.
7.
Start Retail POS and the new skins visualization effects should display similar
to the following image.
03 - 7
User-Interface Extensibility
User-Interface Extensibility Overview
Microsoft Dynamics AX for Retail POS introduces a new way to customize forms by using
the Interaction service. Multiple developers can use this service to customize one or more
forms in one service. If there are multiple customizations, the Interaction service installs
only the first customization it finds for a form. This module also explains how to customize
forms that are not part of the Interaction services.
03 - 8
Lesson Objectives
Explain how to customize forms in POS Plugins without having to use the
InteractionDefault service.
03 - 9
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.
03 - 10
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.
How to Modify a Form in the Microsoft Dynamics Ax 2012 R2/R3 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 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.
03 - 11
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.
2.
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.
3.
Open the Services folder, and then double-click the Visual Studio solution
file, services.sln.
4.
Open the Services folder, and then double-click the Services Visual Studio
solution file.
5.
Click the Dialog project, and then expand the WinFormsTouch Folder. Click
frmItemSearch.cs and select view code. To modify the forms, you must have
a DevExpres license.
6.
7.
8.
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});
//
// colSearchString
//
this.colSearchString.Caption = "Search name";
this.colSearchString.FieldName = "SEARCHNAME";
this.colSearchString.Name = "colSearchString";
this.colSearchString.OptionsColumn.AllowSort =
DevExpress.Utils.DefaultBoolean.False;
this.colSearchString.SortMode =
DevExpress.XtraGrid.ColumnSortMode.Custom;
this.colSearchString.Visible = true;
this.colSearchString.VisibleIndex = 0;
this.colSearchString.Width = 161;
03 - 12
9.
Now, modify the Item Search query to include the new column in the search
criteria so that you can filter and display in the GetItemList() method.
10. 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.
11. 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 form:
03 - 13
03 - 14
Trigger Extensibility
Trigger Extensibility Overview
Triggers are used to capture events that start before and after Microsoft Dynamics
AX for Retail POS operations. You can insert custom logic before the operation
runs or after it is completed. The Retail POS IOperationTriggers interface
introduces new generic triggers called the PreProcessOperation and
PostProcessOperation.
Lesson Objectives
Explain how to customize triggers and how the triggers are used.
03 - 15
Back up the existing assembly before any modification. If you must revert for
any reason, the original assemblies will be available in such scenarios.
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 then double-click the Triggers Visual Studio
solution file.
4. Add a reference to the following assemblies that are located in the Retail POS
runtime folder:
o
DevExpress.Utils.v11.2.dll
o POSProcesses.dll
o System.Windows.Forms.dll
5.
6.
7.
03 - 16
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.
03 - 17
Services Extensibility
Services Extensibility Overview
Microsoft Dynamics AX 2012 includes a collection of core services that can be
customized or replaced by using Retail POS Plug-ins. You can also create new
services that can be started from existing services or triggers.
Lesson Objectives
03 - 18
Lesson Objectives
Before the modification, take the backup of the existing assembly so that the
original assemblies will then remain available if you must revert to them.
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 then double-click the Services Visual Studio
solution file.
4.
Browse to the EOD project, and then double-click the BatchPrinting.cs file
and add the following new method:
5.
Locate the Print method (this Batch batch, ReportType reportType) in the
BatchPrinting.cs file and then add the following line of code after the line
reportLayout.PrepareHeader(batch, reportType);
reportLayout.AppendLine(string.Format("Return count{0}",CalculateNegativeTransaction(batch)));
03 - 20
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.
Lesson Objectives
03 - 21
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.
03 - 22
You can use the fields in 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:
Browse to the folder where you installed the Retail POS Software
Development Kit (SDK). By default, the folder will be located at
C:\Users\...\Documents\Retail SDK\POS Plug-ins\.
2.
Open the Services folder, and then 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.
Copy the new assembly to the POS\Services\Extension folder, and then start
Retail POS. This path applies only for Microsoft Dynamics AX 2012 R2. For
03 - 23
Click the Cashier Tasks button, and then click the MyOperation button. You
will receive the following message in the status panel:
Lesson Objectives
03 - 24
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.
Any fields that are created in custom fields are available in all three sections of the
receipt format designerHeader, Lines, and Footer. The Caption text ID is a
unique identifier for the text that will show in the receipt format designer (unlike
the custom fields for till layout that use the Name in the designer, and the Caption
text ID in the POS). The Caption text ID is still stored in the RetailLanguageText
table and is only used at Headquarters.
To add the custom fields to the Receipt Layout, follow these steps.
After the fields are created they can immediately be added to any receipt format.
2.
Browse to Retail > Setup > POS > Receipt formats, and then click the
Designer button for any receipt format.
03 - 25
If the fields and labels are created correctly, you should be able to find the fields
and labels in the field list for any of the three sections.
03 - 26
Note: You did not correctly create the RetailLanguageText record, if something
appears that resembles (22000)??Missing String??.
3.
Find a place to drag the Total Quantity field and the Time Scanned field to
the header section and give each field a hard-coded text label. Make sure
that you press the Save button when you are finished.
03 - 27
Before the modification, take the backup of the existing assembly so that the
original assemblies remain available if you must revert to the original
assemblies.
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\.
3.
Open the Services folder, and then double-click the Services Visual Studio
solution file.
4.
Locate the FormModulation.cs file in the Printing service. Values for the
header field and the footer field are handled in the
GetInfoFromTransaction() method and for lines it is the
GetInfoFromSaleLineItem() method. Locate the switch statement for
GetInfoFromTransaction() from the following code example.
03 - 28
To print a value for the custom field, you have to add the field name to the
switch statement.
2.
Open the Triggers solution in Visual Studio and browse to the ItemTriggers
project. Now you have to add several things to the project before you add
the code.
o
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");
03 - 29
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.
4.
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.
5.
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:
03 - 30
Payment Grid
Totals Area
Lesson Objectives
Explain how to extend Commerce Data Exchange - Real time service for POS.
03 - 31
RetailTransactionServiceEx Class
To extend the Real-time service, the methods must meet the following criteria:
They must be a public static method.
The return value must be a container 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.
The method parameters must be one of the following Microsoft Dynamics AX
primitive:
o
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, ''];
03 - 32
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;
}
}
03 - 33
4.
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 displays 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 (XppPrRetail POStArgs _args)
{
// All the gift card arguments can be fetched from the _args parameter
// write your logic to update the service
}
5.
6.
By doing it in this manner, both the existing code and the custom code are
managed separately.
03 - 34
Lesson Objectives
Explain how to extend the Retail Store Database utility to execute custom SQL
scripts.
03 - 35
DataAccess
EntityFramework
POSResources
SystemSettings
Transaction
Microsoft.Dynamcics.Retail.Pos.Contracts
Microsoft.Dynamcics.Retail.Pos.DataEntity
Microsoft.Dynamcics.Retail.Pos.DataManager
1.
03 - 36
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 creates a blank text
file in the Upgrades folder.
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
3.
<POSISUPGRADES>
<UPGRADEVERSION>6.2.0.1</UPGRADEVERSION>
<UPGRADESCRIPT>Upgrade6.2.0.1.sql</UPGRADESCRIPT>
</POSISUPGRADES>
4.
03 - 37
03 - 38
5.
6.
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.
Lesson Objectives
Disclaimer
You can copy, alter, adapt, modify or create derivative works of the Microsoft
Dynamics AX Payment Software Development Kit (SDK) and this
TemplateConnector for payment card processing. Additionally, you must use the
Microsoft Dynamics SDK and the TemplateConnector only with Microsoft
Dynamics AX 2012 R2 /R3 in your internal business operations and with valid
licenses of Microsoft Dynamics AX 2012.
You must not permit or authorize any third-party to distribute any of the
derivative works of the Microsoft Dynamics AX Payment SDK and the
TemplateConnector.
03 - 39
IPaymentManager
The Microsoft.Dynamics.Retail.PaymentManager.Reference.IPaymentManager is
the interface that is used for all payment devices. This interface exposes the
methods and events for handling devices.
IPaymentProcessor
The Microsoft.Dynamics.Retail.PaymentSDK.IPaymentProcessor is the interface
that is used for all payment processing methods. This interface exposes the
methods and events for handling payments.
ISessionOperation
The Microsoft.Dynamics.Retail.PaymentSDK.ISessionOperation is the interface that
is used to maintain the session for processing. This interface exposes the methods
and events for handling sessions.
Some key methods of the payment connector include the following:
Methods
03 - 40
Description
Authorize
Refund
Void
Install RetailPOS from the Microsoft Dynamics AX Setup and then unzip the
TemplateConnector.zip file. For the TemplateConnector source code,
download location and license information, refer to the Microsoft Software
License Terms agreement and the developer and demonstration license
agreement.
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.
03 - 41
03 - 42
5.
6.
Click View > Task List to display the task list. The task list shows all the
elements that you should customize for payment.
Microsoft Dynamics AX
Copy the connector assembly to the Microsoft Dynamics AX client and the
following server Connectors directories:
03 - 44
Retail Stores
In Microsoft Dynamics AX, browse to Retail > Setup > POS > Profiles >
Hardware profiles. Select an existing hardware profile or create a new profile.
In the EFT Service FastTab, select Payment Connector from the first drop-down
menu. The payment connector should then be available to select in the second
drop-down menu. After you select it, your merchant properties should display:
03 - 45
03 - 46
03 - 47
Objectives
03 - 48
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)
Detailed Steps
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.
b.
c.
d. 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.
e.
f.
Open the BlankOperation.cs file and add the below line in the
namespace section
using System;
03 - 50
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
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.
03 - 51
Exercise Scenario
We want to prompt the cashier for loyalty card request from the customer after
the first item added to transaction
Detailed Steps
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.
b.
c.
ii.
iii. System.Windows.Forms.dll
iv. Microsoft.Dynamics.Retail.Pos.SystemCore.dll
v.
03 - 52
03 - 53
f.
g. 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;
h.
i.
j.
03 - 54
l.
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
m. If it is first time log on to POS, then POS will display the Shift
form, in that please click "Add a new Shift".
n.
o.
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.
03 - 55
Detailed Steps
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.
b.
c.
Microsoft.Practices.Prism.Interactivity
ii.
Microsoft.Dynamics.Retail.Notification.Contracts
f. 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;
03 - 56
i.
j.
03 - 57
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.
k.
l.
m. Launch Retail POS by clicking the Retail POS on the start page,
and login to POS using the below operator id and password:
03 - 58
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.
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
r.
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).
s.
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.
03 - 59
Open AX from the Desktop icon and then click Ctrl+D to open
development workspace
b.
c.
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.
f.
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;
inventDim.InventSiteId
= inventLocation.InventSiteId;
03 - 60
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
i.
If it is first time log on to POS, then POS will display the Shift
form, in that please click "Add a new Shift".
j.
k.
l.
m. The system will display the inventory status across all legal
entities.
Results
View the inventory status across all the stores.
03 - 61
03 - 62
For Retail POS to install the new skin, you must put the skin assembly in the
Retail POS runtime folder. Copy the MyFirstCustomSkin.dll to the Skins folder
in the Retail POS runtime directory. Also update the new skin name in Retail
>Setup >POS >Profiles >Visual Profiles, and then run the N-1090
scheduler job.
2.
You can use the payment connector to connect any Microsoft Dynamics AX
channel to the payment SDK for payment processing.
3.
Copy the connector assembly to the Microsoft Dynamics AX client and the
4.
Triggers are used to capture events that start before and after Microsoft
Dynamics AX for Retail POS operations
5.
6.
Boolean
date
int
int64
str
guid
Real
7.
8.
03 - 63
Objectives
Note: The Retail Modern POS is comprised of pre-release components. All
pre-release features and functionality are preliminary based on current
expectations, and are subject to change without notice.
The objective of this module is to enable the student gain an understanding of
1.
2.
Lesson Objectives
Understand the various components of the Microsoft Dynamics AX Retail Modern
point of sale(POS) architecture
04 - 2
04 - 4
Description
Entity type
Complex type
Controller
Description
each commerce entity. You can customize
the following controllers:
Metadata
Carts
Catalogs
Categories
Commerce
Commerce Lists
Customers
Employees
Org Units
Picking Lists
Products
Purchase Orders
Sales Orders
Shifts
Transfer Orders
To extend the Retail Server you can create your own entity type or complex type,
extend an existing controller, add a new controller, and customize the metadata. If
the commerce runtime is customized, then the various components in Retail
Server should also be customized to expose those changes to Modern POS clients.
Overview of Microsoft Dynamics AX Retail Server Architecture with Extensibility
04 - 5
04 - 6
1.
2.
3.
4.
Details
If you add one or more new
fields to a table in Microsoft
Dynamics AX, a commerce
entity in the commerce
runtime automatically includes
those fields as long as you
make changes to the stored
procedure or view to return
the additional field.
References
Customize the Data
in a Commerce
Entity
http://technet.micros
oft.com/ENUS/library/jj916616.as
px
Walkthrough:
Adding a table for
customer
preferences to the
AX 2012 database
http://technet.micros
oft.com/ENUS/library/dn720785.
aspx
Customize
Commerce Data
Exchange: Real-time
Service
Enable debugging
Extend the
Commerce Data
Exchange: Real-time
Service
http://technet.micros
oft.com/ENUS/library/dn126098.
aspx
http://technet.micros
oft.com/EN-
04 - 7
Details
References
US/library/dn126099.
aspx
04 - 8
Details
References
Customize the
Data in a
Commerce Entity
http://technet.micr
osoft.com/ENUS/library/jj916616
.aspx
Walkthrough:
Adding a table for
customer
preferences to the
AX 2012 database
http://technet.micr
osoft.com/ENUS/library/dn72078
5.aspx
Walkthrough:
Extending the CRT
to add customer
preference data
for Retail clients
http://technet.micr
osoft.com/ENUS/library/dn72079
0.aspx
Details
References
Services Overview
for Commerce
Runtime
http://technet.micr
osoft.com/ENUS/library/jj916617
.aspx
Integrate a Service
into the
Commerce
Runtime
http://technet.micr
osoft.com/ENUS/library/jj916619
.aspx
Walkthrough:
Integrating a new
Shipping Service
http://technet.micr
osoft.com/ENUS/library/jj916622
.aspx
Customize workflow
Create Commerce
Runtime
Workflows
.NET Framework
Classes for
Microsoft
Dynamics AX
Commerce
Runtime
http://technet.micr
osoft.com/ENUS/library/jj916618
.aspx
http://technet.micr
osoft.com/ENUS/library/jj992752
.aspx
04 - 9
Details
Deploy your
commerce runtime
customizations
References
Extend an existing
controller
Extend metadata
(OData)
04 - 10
Details
References
Create a new
Retail Server
Controller
Extend a Retail
Server OData
Controller
Extend the
metadata
http://technet.micr
osoft.com/ENUS/library/dn74146
1.aspx
http://technet.micr
osoft.com/ENUS/library/dn74144
7.aspx
http://technet.micr
osoft.com/ENUS/library/dn74145
8.aspx
Details
.NET Framework
Classes for
Microsoft
Dynamics AX
Retail Server
Retail Server
reference
References
http://technet.micr
osoft.com/ENUS/library/dn74143
7.aspx
http://technet.micr
osoft.com/ENUS/library/dn72036
3.aspx
Incorporate your
changes
Details
References
Extend
Modern
POS for
a
Windows
client
Retail SDK
TypeScript for
Visual Studio
2012 and 2013
http://technet.
microsoft.com/
ENUS/library/dn7
20295.aspx
04 - 11
Details
install TypeScript for Visual Studio 2012 and
2013.
References
http://www.mic
rosoft.com/enus/download/d
etails.aspx?id=
34790
Windows Dev
Center
http://msdn.mi
crosoft.com/en
US/windows/ap
ps/
Extend
Modern
POS for
Windows
Phone
client
Retail SDK
http://technet.
microsoft.com/
ENUS/library/dn7
20295.aspx
Windows
Phone Dev
Center
http://develope
r.windowsphon
e.com/en-us
Enable
Modern
POS for
Windows
Phone
reports
Enable reports
for Microsoft
Dynamics AX
Retail
Windows
Phone Point of
Sale
http://technet.
microsoft.com/
ENUS/library/dn7
41448.aspx
Package
your
changes
04 - 12
Create an app
package
Details
References
http://msdn.mi
crosoft.com/en
us/windows/ap
ps/hh975357.as
px
Install Modern
POS
http://technet.
microsoft.com/
ENUS/library/dn7
41434.aspx#Cu
stomized
04 - 13
2.
3.
4.
Detailed Steps
Create the RetailCustPreferences table
04 - 14
1.
2.
3.
04 - 15
4.
04 - 16
5.
Add a Primary Key based foreign key to the CustTable relation, and
set the SourceEDT as CustAccount, rename the newly created field
CustTable to AccountNum
6.
04 - 17
7.
04 - 18
8.
Generate the CIL code for the new table by clicking Compile
2.
04 - 20
3.
4.
5.
6.
04 - 21
7.
8.
Detailed Steps
04 - 22
2.
In Object Explorer, expand the database node for and then expand
the Tables node.
3.
4.
Go to the top line of the generated script and change the USE
statement to the name of the channel database (aka the CRT
database). The default name for this database after you install
Microsoft Dynamics AX 2012 R3 is AxRetailSP. If that is the name of
your channel database, the following example illustrates the USE
statement. USE [AxRetailSP]
5.
6.
7.
2.
3.
4.
Click Script View as, ALTER to, New Query Editor Window.
5.
Add the following lines to the query to include the EmailOptIn field in
the CustomersView.
6.
Set up and run a subjob to synchronize values for the new data field to the online
channel database
You run jobs to synchronize data from AX 2012 to the CRT. For more information,
see http://technet.microsoft.com/EN-US/library/jj680084.aspx
In the AX 2012 Distribution schedule form, create a subjob under the Customer
job for RetailCustPreferences. Run the jobs that synchronize initial data in AX 2012
to the distribution location
Update the SQL Server Stored Procedure Code
Review the entire contents of the sample code for CommerceRuntimeScripts.sql
available at
http://technet.microsoft.com/EN-US/library/dn720790.aspx
There are four places where code has been inserted. Search for
SDKSAMPLE_CUSTOMERPREFERENCES to find them.
Note: SAMPLE CODE NOTICE
THIS SAMPLE CODE IS MADE AVAILABLE AS IS. MICROSOFT MAKES NO WARRANTIES, WHETHER EXPRESS OR
IMPLIED, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS,
OR CONDITIONS OF MERCHANTABILITY. THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS
SAMPLE CODE REMAINS WITH THE USER. NO TECHNICALSUPPORT IS PROVIDED. YOU MAY NOT DISTRIBUTE THIS
CODE UNLESS YOU HAVE A LICENSE AGREEMENT WITH MICROSOFT THAT ALLOWS YOU TO DO SO.
Detailed Steps
Add the RetailCustPreferences table in the data distribution to the CRT for the
Retail channel
The channel schema is the XML description of the data sent from AX 2012 to the
04 - 24
2.
3.
Field name
Type
Length
ACCOUNTNUM
None
DATAREAID
None
04 - 25
Type
Length
EMAILOPTIN
None
RECID
None
04 - 26
2.
3.
4.
5.
6.
7.
On the Field list form, click Functions and then click Match fields to
generate all matching fields. The From Field and To Field columns
are filled in.
04 - 27
8.
9.
Next click Retail > Setup > Retail scheduler, open Retail channel
schema, and select AX 2012 R3, in the Retail data distribution fast tab,
10. Copy the XML in the Table Distribution field into an editor such as
04 - 28
04 - 29
Detailed Steps
Extend Modern POS user interface to collect email preference
04 - 30
1.
2.
Add the following two UI resource texts in POS\Assets\Strings\enUS\resources.resjson under section CUSTOMERADDEDIT RESOURCES
. RANGE: [1300 - 1399]
a.
// HOL
this.emailOptIn = ko.observable(false);
04 - 31
b.
// HOL
private addUpdateExtensionProperty(key: string, intValue: number) {
if (this.CustomerProxy) {
if
(!this.CustomerProxy.ExtensionProperties()) {
this.CustomerProxy.ExtensionProperties = ko.observableArray([]);
04 - 32
04 - 33
c.
=> {
return property.Key === this._emailOptIn_Key;
});
if (ArrayExtensions.hasElements(properties)) {
var emailOptInProperty= properties[0];
if (emailOptInProperty.Value) {
this.emailOptIn(emailOptInProperty.Value.IntegerValue
=== 1);
}
}
04 - 34
3.
data-bind="checked:
customerAddEditViewModel.emailOptIn"/>
<label for="specialOfferTabRead" data-bind="resx: {
textContent: 'string_1366' }">Receive special offers?</label>
</div>
04 - 35
4.
5.
select No
6.
04 - 36
Follow the steps and enter needed info, click Create to create the
7.
8.
Detailed Steps
Add a Login Image and Welcome Screen Image
04 - 37
Browse to the folder where the images are maintained and select the
login screen image.
/
3.
Click New, enter Image ID 9001, click Select image, and then select
the Welcome Screen image.
/
4.
Click Close.
/
Detailed Steps
Create a new visual profile setup
To create a new visual profile, follow these steps
1.
Browse to AX > Retail > Setup > POS > Profiles > Visual profiles, and
then click New.
/
04 - 38
Theme: Dark
Detailed Steps
Create a new Modern POS Register
To create a new register, follow these steps.
1.
In Microsoft Dynamics AX browse to Retail > Setup > POS > POS
registers, and then click New.
/
Store: Houston
Detailed Steps
Create new button grid to be used by the Modern POS UI
To create a new button grid, follow these steps.
1.
Browse to Retail > Setup > POS> Button grids, click New and
specify the following, and then click Designer.
o
2.
Expand the form so that all the options are visible, and then select
New design.
/
3.
04 - 39
Specify the button grid operations, colors, fonts, and images for each button.
Detailed Steps
Create a new screen layout to be used by the Modern POS
To define a new screen layout, follow these steps.
04 - 40
1.
In Microsoft Dynamics AX, browse to Retail > Setup > POS > Screen
layouts, click New and then specify the following:
Name: HOL1
Height: 768
Width: 1366
2.
In the Button grids section click Add and then select the following:
o
3.
In the Images section, click Add and specify the following, and then
click Designer.Add Welcome screen 1 = 9001
1.
2.
Lines
Payments
Delivery
Totals panel
Right column:
Subtotal
Tax
Payment
04 - 41
2.
Click the Retail option and then click Add screen layout HOL1.
3.
2.
3.
4.
Give the jobs some time to finish and then return to Modern POS.
Results
Add an Image
Create a new visual profile
Create a new Modern POS Register
04 - 42
Objectives
Explain the testing considerations for several testing types for the POS
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. Unit tests isolate the logic by replacing
dependencies on the run-time environment, such as SharePoint, with testprovided 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
Configuration testing is 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
Functional testing 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 that is being tested.
Integration Testing
Integration testing is performed 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
Performance testing is performed by the performance engineer. Performance
05 - 2
Hardware Testing
Hardware testing tests the hardware devices that are connected to a POS
application that has different configurations. Before the device is tested with POS,
you must test all the hardware devices that have the test utility that is provided by
the device manufacturer. This helps make sure that the devices are working
correctly.
05 - 3
Printers
Printer testing verifies whether the correct information that is related to an item is
printed on different receipts that are generated at the printer. The correct
information that is related to the customer, such as the items ordered and the
total should be printed on the receipts.
Weighing Scale
Weight scale testing is used to weigh items sold by weight. The scale should
display the exact quantity of an item that is put on the scale and the price should
be displayed according to the weight of the item.
Cash Drawer
Cash draw testing 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 item that is ordered and the price. This helps
the customer view the item he or she ordered. Line display testing also displays
the amount due, the amount tendered 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
Keyboard testing 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. EFT testing should also display the
PCI complaint.
05 - 5
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 available to test
applications which will help prevent 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 infrastructures.
PCI Compliance
Care must be taken to implement the PCI-compliant, tamper-proof infrastructure
at all POS terminals to protect cardholder data and identity.
05 - 6
Testing Considerations
Testing considerations include the following:
Must have a hardware configuration for every terminal for every store
server
End to end functional testing (smoke testing) after all the modules are
integrated
Install testing for all terminals for each store server and for each store
server for every real-time server
Data volumes
UI Testing Considerations
05 - 8
Ease of usage
Module Review
Module Review and Takeaways
This module explained the different kinds of testing that is involved in the POS
deployment. Additionally, the module explained the testing challenges that are
involved and the elements that you must consider before testing begins.
2.
05 - 9
05 - 10
1.
-te
2.
Objectives
The objectives are:
Explain the steps that are required for the retail hotfix or for the
update deployment.
06 - 2
at
Deployment Components
The types of computers that are used in a typical Microsoft Dynamics AX 2012 R3
Retail deployment are shown in the following table:
Deployment
location
Head office
Types of computers
Brick-andmortar
stores
Correct planning before a system is deployed can minimize the downtime of the
system. The deployment should be conducted in the following environments
before the system is deployed in the production environment.
Test environment This is the environment where Microsoft Dynamics AX POS
customizations and solutions, possibly from different vendors, are deployed,
integrated, and tested.
Staging or pre-production environment This is the environment that is built
based on the production environment. Typically, it contains business data from
the production system. Microsoft Dynamics AX models and customizations are
moved to a staging environment after they are integrated and tested on a test
environment.
Production environment This is the final environment that customers use to
run their business.
06 - 3
At the store, bring offline registers online and make sure that offline
transactions have been synchronized with the store database. [Note :
If you skip this step, severe data damage and possible financial losses
can occur. After you upgrade the store database, you can no longer
synchronize transactions from existing offline databases]
2.
3.
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, and install binary updates to
non-database and database components. Then, if you have customized Retail
POS, you must re-merge your code changes to services and triggers, compile, and
re-deploy.
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 topic Deploy
Updates in a Retail Environment- http://technet.microsoft.com/enus/library/dn305851.aspx
06 - 4
06 - 5
Browse to the location where you extracted the files for the update, and then
double-click AxUpdate.exe.
Install updates.
You do not have to restart the Application Object Server (AOS) after you install
the binary retail components.
06 - 6
06 - 7
Module Review
Module Review and Takeaways
This module explained the following:
06 - 8
1.
2.
06 - 9
Detailed Steps
Create a new Dynamics AX 2012 R3 table
1.
2.
3.
4.
5.
Add a PrimaryKey based foreign key to the CustTable relation, and set the
SourceEDT as CustAccount, rename the newly created field CustTable to
AccountNum
6.
7.
Save the changes and click Synchronize to sync the changes to database
8.
Generate the CIL code for the new table by clicking Compile
9.
Extend Form CustTable
10. Launch to Dynamics AX 2012 R3 , go to AOT > Forms > CustTable
11. Add RetailCustPreference as a Data Source with JoinSource as CustTable and
LinkType as OuterJoin
13. Add a new field EmailOptIn from table RetailCustPreference within the
CustomerPreference group
17. Go to Accounts receivable > Common > Customers > All customers, edit a
customer record, go to Retail fasttab, check Email Opt In checkbox, and save.
Configure CDX Asycn
18. Launch to Dynamics AX 2012 R3 , go to Retail > Setup > Retail scheduler, open Retail
channel schema, and select AX 2012 R3
Create a new subjob RetailCustPreference with the following highlighted data by going to Retail
> Setup > Retail scheduler > Scheduler subjobs form
2.
On Schedular subjob form, click Transfer field list to open the Field list form
3.
On the Field list form, click Functions > Match fields to generate all matching fields.
4.
Go to Retail > Setup > Retail scheduler, open Retail channel schema, and select AX 2012 R3,
in the Retail data distribution fasttab, add the following highlighted RetailCustPreference
definition to the Table distribution
5.
Add subjob RetailCustPreference to job 1010 by going to Retail > Setup > Retail scheduler >
Scheduler jobs form
6.
Task Overview
1.
2.
3.
4.
5.
Detailed Steps
Extend channel database to store email preference
1.
2.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
(
[RECID] 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
3.
SET QUOTED_IDENTIFIER ON
GO
rct.RECEIPTEMAIL RECEIPTEMAIL,
dpt.LANGUAGEID AS LANGUAGE,
ct.DATAAREAID,
rct.RECID RETAILCUSTOMERRECID,
ct.CURRENCY,
ct.INVOICEACCOUNT,
ct.CREDITMAX,
ct.ONETIMECUSTOMER,
ct.MARKUPGROUP,
ct.PRICEGROUP,
ct.CUSTGROUP,
ct.BLOCKED,
ct.ORGID,
ct.MULTILINEDISC,
ct.USEPURCHREQUEST,
ct.LINEDISC,
ct.INCLTAX,
ct.ENDDISC,
ct.TAXGROUP,
ct.CREDITRATING,
ct.TAXLICENSENUM,
ct.VATNUM,
ct.IDENTIFICATIONNUMBER
, isnull(rcp.EMAILOPTIN, 0) as EMAILOPTIN
FROM [ax].CUSTTABLE ct
JOIN [ax].DIRPARTYTABLE dpt ON ct.PARTY = dpt.RECID
ct.ACCOUNTNUM
AND
ceap.ISPRIMARY
AND
-- email
LEFT OUTER JOIN [crt].CUSTOMERELECTRONICADDRESSESVIEW ceae ON dpt.RECID
= ceae.DIRPARTYRECORDID
AND ceae.METHODYTPE
ceae.PARENTLOCATION = 0
AND
ceae.ISPRIMARY
AND
-- url
LEFT OUTER JOIN [crt].CUSTOMERELECTRONICADDRESSESVIEW ceau ON dpt.RECID
= ceau.DIRPARTYRECORDID
AND ceau.METHODYTPE
ceau.PARENTLOCATION = 0
AND
ceau.ISPRIMARY
AND
-- cellphone
LEFT OUTER JOIN [crt].CUSTOMERELECTRONICADDRESSESVIEW
dpt.RECID = ceacp.DIRPARTYRECORDID
ceacp
ON
AND ceacp.METHODYTPE = 1
AND ceacp.ISPRIMARY = 0
AND ceacp.ISMOBILEPHONE = 1
-- email preference
LEFT OUTER JOIN ax.RETAILCUSTPREFERENCE rcp on ct.ACCOUNTNUM =
rcp.ACCOUNTNUM AND ct.DATAAREAID = rcp.DATAAREAID
)
GO
4.
Launch to Dynamics AX 2012 R3 , go to Retail > Periodic > Data distribution > Distribution
schedule, run job 1010 Customers to send data to channels
Extend mobile POS to add email preference on the customer edit page
1.
2.
a.
if
c.
Add
the
following
code
in
this.customerManager.getCustomerDetailsAsync
CustomerAddEditViewModel.LoadCustomer
// HOL
the
call
in
back
of
method
if (ArrayExtensions.hasElements(properties)) {
var emailOptInProperty= properties[0];
if (emailOptInProperty.Value) {
this.emailOptIn(emailOptInProperty.Value.IntegerValue === 1);
}
}
// HOL
3.
Extend
the
customer
page
to
add
email
preference
Views\Customer\CustomerAddEditView.html under the Phone number section
in
4.
5.
Build the project by going to BUILD > Build Solution in Visual Studio 2012
Create a package by selecting POS project, then go to menu PROJECT > Store > Create App
Packages,
select No
Follow the steps and enter needed info, click Create to create the package
6.