Hi There!
I hope everybody had a really good weekend. I rode my motorcycle to upstate New York and it was awesome.
Anyway, I will be working on a series of post related to the Microsoft Dynamics AX 2012 POS application. There is a lot to learn and therefore to cover, so I made the choice to start by showing a simple example on how the Application Triggers work.
Application Triggers are called before and after certain operations when the Microsoft Dynamics AX 2012 POS application is running. This is the first assembly that AX 2012 POS looks at when starting.
In addition, you can override the default Application Triggers’ operations by using the IApplicationTrigger interface provided by the Microsoft.Dynamics.Retail.Pos.Contracts.Triggers namespace in Visual Studio 2010.
It is important to understand AX 2012 Retail POS development lies heavily on using interfaces. Most operations that interact with AX 2012 POS are executed through interfaces. For example, the following picture depicts the use of the ICustomer interface.
NOTE: The dll for this namespace can be found in the AX 2012 POS Fiscal Form. For more information on this, you can download the AX 2012 POS Fiscal Sample from Partner Source.
So, let’s start by setting up the environment in Visual Studio 2010. Please note that to complete this tutorial you will need to have the AX 2012 POS application running in a machine you can work on.
Open the Visual Studio Solution Fiscal Sample and do the following:
1- Right click on the ApplicationTriggers project and choose properties.
2- In the Application tab make sure both the Assembly Name and Default Namespace have the name ApplicatioTriggers. In addition, make sure your Output Type is set to Class Library.
6- In the Signing tab, check the Sign the assembly and choose New. A new window will appear and just give it any name you want. This will create an assembly file in your Visual Studio solution. You can then copy it and paste it to other projects.
7- We need to add a few references. So right click in references and choose the one depicted in the figure in step 8
8- Import the following references.
10- Build the solution. By doing this, you are overriding the default ApplicationTriggers.dll dynamics library with the code in step 9. Make sure you don’t have any build errors.
11- Run the solution and you should see the following two messages.
a- Public void ApplicationStart()
b- Public void LoginWindowVisible()
12- Before the login windows appears you should see the following message.
13- Enter the user name and password and you should see the following message.
14- Click the Log Off button and you should see the following message.
As I mentioned at the beginning of this post, there is a lot to learn. I also think that the Microsoft team did an excellent job simplifying the POS development from the AX 2009 POS version. Unfortunately, there is not a lot of information available for AX 2012 POS development in Partner Source and/or TechnNet, and it is my hope the Microsoft can start releasing some of it soon. Until then, let's wok together on discovering the new stuff in AX 2012 POS.
That’s all for now folks.
Stay tune for my next post on Blank Operations for AX 2012 POS development. In addition, I will also cover the POS architecture and other really cool stuff around it.
Take care!
I can't found Fiscal sample.
ReplyDeleteI look for it at google and partner source.
Can you helpme on this search?
Thanks
Carlos
xals.foro@google.com
My comment was maggic. After send it to you I can found the proyect.
ReplyDeleteThanks a lot.
Does anyone know a similar example but for 2009?
ReplyDelete