Sunteți pe pagina 1din 3

How to: Add custom control to POS screen layout

Sample files
PosCustomControl. PosCustomControl. cs designer.cs

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

Tutorial
AX Dynamics Retail allows partners to add custom control to POS screen layout. Step 1: Define the custom control at HQ in Retail > Setup > POS > Profiles > Custom fields form. 1. Enter control a name that is the class name of the control we will implement. 2. Select the type as Custom control 3. Enter a localizable caption text id. (Refer How to add a localizble string)

Step 2: Add the custom control to the screen layout in Retail > Setup > POS > Screen layouts form. 1. 2. 3. 4. 5. From Screen layout form, launch the designer for a select screen layout. In the designer window, click Design mode and select Main layout. Customization palate will show the Pos Custom Control Drag and drop this control to the screen layout, adjust view as required and click OK. Run the N-1090 job to push the changes down to POS.

Step 3: Implement the custom control in a plug in assembly. 1. Download and install the Dynamics AX 2012 for Retail SDK 2. Open the solution file e.g. C:\Users\<username>\My Documents\Retail POS Plugins\Services\Services.sln 3. Create a new project (Or use add a new control to existing service project say Blank Operation)

4. Add the sample control included in this doc to the project. 5. Make a copy of the DLL being replaced in C:\Program Files\Microsoft Dynamics AX\6.0\Retail POS\Services so it can be restored later 6. Compile the project and copy the customized DLL to the POS Services folder, replacing the existing one e.g. C:\Program Files\Microsoft Dynamics AX\6.0\Retail POS\Services\<Your Assembly> 7. Run pos.exe and log in 8. You should see the custom control rendered on the POS screen layout.

Example
[Export(typeof(IPosCustomControl))] [PartCreationPolicy(CreationPolicy.NonShared)] public partial class PosCustomControl : UserControl, IPosCustomControl {

S-ar putea să vă placă și