Sie sind auf Seite 1von 4

How to: Using the operation trigger

Further reading
Microsoft Dynamics AX 2012 for Developers [AX 2012] SDK Download

What is the operation trigger


We have introduced in POS 2012 a new trigger called the OperationTriggers. This trigger fires at the beginning and at the end of any POS operation.

How to use the operation trigger


First install the RetailPOS.msi and RetailPOSPlugins.msi Then open the solution file in %USERPROFILE%\Documents\Retail POS Plug-ins\Triggers\Triggers.sln 1. Right click on the OperationTriggers and choose properties

2. Change the Assembly name from OperationTriggers to your assembly name i.e. MartinsOperationTriggers

3. We need to add the following references

4. In this example Im only going to take action on the CardSwipe operation. So open up the OperationTrigger.cs file and add the following using statement

5. We then want to popup a messagebox at the beginning and end of the SwipeOperation. Here is the code to enable that to happen 6. Update the PreProcessOperation()

7. Update the PostProcessOperation()

8. Then I copy my MartinsOperationTriggers.dll to %Pos%\Services\ Extensions (To copy this dll to multiple installations of POS you can use System Center or similar) 9. Then when you run POS and swipe a credit card the start messagebox is displayed and when you finished the operation the end messagebox is displayed

Das könnte Ihnen auch gefallen