Friday, February 20, 2015

AX2012 R3: Technical overview of developing new RF processes

Hi Friends,
AX 2012 R3 comes with out of the box warehouse mobile device portal which can be accessed via mobile devices. 
If you are working on a development task to create new/extend existing RF screens then here are some basic design principles which should be kept in mind throughout the development process:

1. RF processes are small and clear tasks. So be very clear about what process needs to be build. Discuss and brainstorm with consultant to make the process crisp, clear and user friendly.

2. There should be a clear division of  the complete process into steps. This is important not only from understanding point of view but also in order to do the development of the classes as the framework classes  require you to set the process stage every time a scan is done.

3. Create a  process flow diagram of the process. This helps to visualize the process more clearly.

Moving on it is very important to understand how the technical architecture for this framework works. Here are some key points:

  • The class controlling the RF screens behaviour is WHSWorkExecuteDisplay. Every RF process class extends this class. So if you are on the way to create your custom screens then you know the first point. Your new class needs to extend WHSWorkExecuteDisplay class.

  • This is an abstract class, note that there are variable which hold the step and pass information, these play very important role in developing the process.



  • Another important class in this framework is WhsRFPassthrough. It maintains the complete information of values stored in all the process variables at each step.

  • Apart from extending this class there are 2 more enums which you need to modify to plug in your new process:
    • WHSWorkExecuteMode
    • WHSWorkActivity.


  • There are few methods in WHSWorkExecuteDisplay class which are of quite importance as you can model you process just by overriding these methods and understanding how they work.
  • displayForm() is an abstract method in this class. When you override it, the below things are done:
    • You build the container
    • Set the process step inside this method
Refer to any standard AX class where this method is overridden to get an idea of how to model this function.
      

  • It is based on containers and maps. 
  • Map named pass in class stores all the control values. 
  • Values/selections are all stored and then processed at run time. 
  • There are no form designs, all the magic is happening inside the classes using X++ code.

For example the below code from WhsWorkExecuteDisplayProdStart class gives an idea of how to build this method:





There is a great article written by Alex Anikiev which can be found here to show how we can leverage the existing architecture to create new custom RF screens. The above basic idea of how the classes work should make the overall understanding more smooth.

Let's also take a look at the setup required to use the RF screens. The setup is very simple:
1. Setup Mobile device menu item --> All menu items on RF menu need to be defined on this form. It can be accessed from Warehouse management -> Setup -> Mobile device -> Mobile device menu items





2. Setup mobile device menu : On this form you can set up the different menus that will be displayed on the mobile device. This form can be accessed from Warehouse Management > Setup > Mobile Device > Mobile Device Menu and is very straight forward to configure.


3. Setup user worker: We need to set up a user ID for workers who will be using the mobile device. This can be done from Warehouse Management > Setup >Work User > Worker screen. You will need to define the setup for the worker attached to your AX user. Here you can select the default warehouse and the default main menu for the user.



You are done with the required setup and can start using the RF screens and explore the possibilities.

Wednesday, February 4, 2015

AX2012 R3 : Troubleshooting customized SSRS reports deployment error after AX2012 R3 upgrade

Hi Friends,
After upgrading an AX2012 R2 environment to AX2012 R3, I was getting the below error on deploying the customized reports. Although, I verified that the reporting services extensions were installed, report server was configured properly and I was able to deploy the standard reports without any errors, I was still getting the below error on deploying the customized reports:





In order to fix this error:

1. Export the SSRS report object as a XPO.

2. Open the XPO in notepad.

3. Search for text "Version" and replace version values from 6.2.0.0 to 6.3.0.0 towards the end of the file, shown below:




4. Save the changes in XPO and import it.

5. Deploy the report.


So if there are couple of reports, then export all of them together in in XPO and replace the text 6.2.0.0 to 6.3.0.0 and then import all the reports in one go. Of course, no need to mention that it's always worth taking backups before doing such tasks ;).