Saturday, November 30, 2013

Picking setup in Microsoft Dynamics AX

Hi Friends,
In this post I want to highlight how Microsoft Dynamics AX determines the picking method for an order line by taking the example of sales line. This setup is important for companies having major focus on supply chain.

When posting picking list of a sales order, you can view the type of picking determined by the system for a sales line on the lines details tab on the post picking list form as shown below:


If the check box is not checked then system processes the line as an order picking.
User can change the value by checking/unchecking the check box before posting which is a great example of flexibility provided by Microsoft Dynamics AX.

So now let us see how system determines the picking method for a line. The setup can be done on three places, the sequence in which system checks is as following:

1. First place where system checks the picking method is the "Use consolidated picking method" field on the warehouse item setup defined for the item:


 
If the value defined here is "Yes" then system considers the line for consolidated picking. If the value is "No" then system considers the line for order picking. If the value defined is "According to warehouse setup" then system continues to check the second level of setup.

2. If the setup on warehouse items is "According to warehouse setup" then system checks the picking method defined on warehouse used in sales line:


If the value defined here is "Yes" then system considers the line for consolidated picking. If the value is "No" then system considers the line for order picking.If the value defined is "According to model group" then system continues to check the third level of setup.

3. If the picking method defined on warehouse of "According to model group" then system checks the value of field "Consolidated picking method" on the model group defined on item:




The code to read the above setup can be found at useWMSOrder() method written on salesLine table. See below the sequence of methods called to determine the picking method.
The code really simple to read and a good example where reading code is easier then jumping on different forms to understand the setup :)



An example of this method call is on initFromSalesLine method when creating the salesParmLine as shown below:




Thanks for reading the blog. Keep sharing and take care.

Monday, November 25, 2013

AX2012 : CIL generation error : The given key was not present in the dictionary.

Recently I faced this error when generating incremental IL
"CIL generation: The given key was not present in the dictionary."

The quick way to fix this is to check the CIL log file, generally located at "C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL\Dynamics.Ax.Application.dll.log"

Here you will find the AOT object for which the CIL generator found the error. Compile that object, fix the error and then regenerate the IL.

Before generating IL it is good practise to make sure that there are no compilation errors in the code.
 

Friday, November 22, 2013

AX2012:Restore or (Ctrl + F5) command on forms using X++ code

Hi Friends,
This is a simple tip but good to keep the information handy.
When the records displayed on the form are updated by some other process we get an error "The values displayed in the form are not current, so an update or deletion cannot be made. To view the current values, on the Command menu, click Restore or press CTRL+F5".

In one of my recent projects, there was a situation when I wanted execute ctrl+ F5 command from code. I looked into the task macro but this command was not defined there so the challenge was to find the task id for this command so that I can pass it in element.task() method.

In order to get this task ID, I override the task method on the form and enabled debugger, opened the form and pressed ctrl + F5. The method was called and I got the task ID as 2839.

So in order to execute ctrl+F5 just call element.task(2839) and the record values will be restored.

You can also find task ID of other commands using this approach.

Thanks for reading the blog.
Keep sharing.

Tuesday, November 5, 2013

AX2012 R2 CU7 released - Summary of few technical enhancements

Microsoft  announced the release of Cumulative Update (CU) 7 for Microsoft Dynamics AX2012 R2 on 1st Nov 2013.The update can be downloaded from here

While we are waiting for complete details to be out on partnersouce, we can still find out many good details on technet. The what's new link for modules, features and country specific regions on technet is here.

Below are some major technical enhancements I came across on digging technet:

  • AxBuild.exe utility program to accomplish a full X++ compile to p-code on AOS. This is much faster then the client compile. This utility start several temporary instances of the AOS and tells each AOS which piece of X++ compile to accomplish. It then consolidates results from each AOS and reports them to log files.  According to Microsoft tests this is 13 times faster than the normal client compile. Isn't this cool. It is good to see new tool to save time for partners/customers in the most time consuming technical maintenance activity. More details can be found on technet article here 
  • Backup and Recovery : With the release of CU7, Microsoft Dynamics AX2012 R2 now includes a Volume Shadow Copy Service (VSS) writer which integrates with windows VSS framework. This will be an interesting area to explore. More technical details can be found here.
  • Data export/import framework is now shipped as a part of standard Microsoft Dynamics AX instead as an add-on. A whole new set of entities are added to the portfolio. 
  • Office add ins improved performance and new feature which can be found here
  • Reporting : Cool new features to enhance working experience like new methods to set advance printer properties, power shell command to integrate multiple report server instances, new classes to improve performance on report server. More details can be found here

There is a whole new set of things to explore in Microsoft Dynamics AX, keep exploring and keep sharing.