How to Sort Sales Picking Work by Location in Warehouse Management in Dynamics AX 2012 R3

by | Updated November 19, 2017 | Dynamics AX, Inventory, Set Up

In my experience as a consultant and as a support engineer, I’ve found just the mention of the word “sorting” can seem like a daunting task to any user. No matter what it is you are trying to sort, many times it takes trial and error, as well as testing to get it right. In this post, we’ll start with a basic use of sorting in Warehouse Management– how to sort sales picking work in pick face or bin location order.

The first thing you want to do is go to the Locations form and add a sort code number in the Sort code field for each picking location that you want to sort (Warehouse management > Setup > Warehouse setup > Locations). The Sort code field stores the sort order of the locations and by default, it’s populated with a 0. By numbering the pick faces or locations, you can then control the order in which picking work is created. In this example, I added sort codes in numeric order.
Locations in Warehouse Management

Once you have added the sort codes to the locations, the next step is to add a query to the work template. (Warehouse management > Setup > Work > Work templates)

Select a work template that has a Work order type of Sales orders that will be used for the picking work transactions.

Click on the Edit query button.

On the Sales form, click on the Sorting tab.

Add Sort code as the Field and Ascending as the Search direction.

Edit Query Sorting

In this example, I created a sales order for three items, 000001, 000006 and 000007, all of which are located in fixed picking locations: Pick-001, Pick-004, and Pick-003. Notice the locations are not in numeric order.

Fixed Locations in Dynamics AX

Here’s the sales order with the three items on it:

Sales Order

Here’s how the work transactions will be created when sorting is used, where the picking will be completed in pick face or bin location order: Pick-001, Pick-003, Pick-004.


Here’s how the work transactions will be created when sorting isn’t used, where picking is completed in the order the items were entered on the sales order not in pick face or bin location order: Pick-001, Pick-004, Pick-003.


Options for Sorting Work by Location

There are other ways you can sort work by location:

1. By adding additional sorts to the work template
2. By using Cluster Picking

Option 1

Add sorts to the work template

The most simple method is to sort by the Location field on the work template. This works if the format of your locations are in numeric/alphanumeric order, for example.

One issue with sorting by the sort order code or the Location only is if you have items in multiple locations, you could end up going back to the same location multiple times during a pick. To optimize the pick path and sort the work by location, you can sort the work by Shipment ID, Sort code, and Item number on the work template, for example.

Verify there is inventory on hand for each item in multiple locations. (These screenshots include reservations from the following sales order)

Enter a sales order with two items on it

Release the sales order to the warehouse and create the work transactions. The work is created in Sort code/Location order, with multiple picks at each location for different item numbers.

Option 2

A second option would be to use cluster picking and set up positions on the cart/user:

The cluster profile can be set up to sort on sortcode:
Warehouse management > Setup > Mobile device > Cluster profiles

Add a cluster picking menu item to the mobile device:


Start the picking work:






Related Posts


  1. Tania

    Hi, Thank you for the post. This solution is very helpful and works well when all quantities for a given item are all in the same location, however when an item is split into different locations it will visit all locations for ItemA (using sort code), then may revisit the same locations for ItemB (again using sort code) and so on. This means that any given location can be visited multiple times (work lines are first sorted by item and then by location). Have you come across this kind of behavior and do you know how to have the work sorted by location only, and not by item?
    Thank you

  2. Brandon Carmichael

    Hello Tania,

    I wanted to let you know that I went directly to Wendy Ring with your questions. Due to the complexity and her lengthy response, we updated the blog post to cover your question. As such, please refer back to the updated post.

    Please let me know if you have any additional questions or comments.

  3. J.

    Hi there,

    I have been trying to use this sorting option also for the receipt of purchase orders.
    At first it seemed to work, but after a few test we don’t get the expected result.
    A work template is created with sorting in the query on the Sort code and also on the Location

    Could you try to help?

    thanks in advance

  4. Taylor Valnes

    Hello J,

    I reached out to Wendy, the author, and asked her your questions. Unfortunately we would need to know more about what the unexpected result is, possibly with screen shots. If it’s not an easily described problem I would suggest reaching out to your partner to see if they can help, or we offer support plans that can be used a variety of ways.


Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events


03mar10:00 am10:30 amThe Modern Manufacturer - MRP vs. MPS – What, When and How

03mar2:00 pm2:30 pmLot Management Best Practices for Batch Manufacturers

10mar10:00 am10:30 amEnhancing the Customer Experience and Driving More Business with Dynamics 365 Customer Service

10mar2:00 pm2:30 pmThe Five Steps to Managing Sales Tax

11mar11:00 am12:00 pmConfab with Stoneridge - Livestream - Power Apps Component Framework Power Hour

17mar10:00 am10:30 amThe Modern Manufacturer: Pro Tips for your Finance Team

24mar10:00 am10:30 amUnlock the Potential of Digital Marketing with Dynamics 365 Marketing

25mar11:00 am12:00 pmConfab with Stoneridge - Livestream - The Four Keys to Choosing the Best ERP or CRM Solution

31mar10:00 am10:30 amThe Modern Manufacturer: Keys to Reporting Success

31mar01aprTraining Class: Financial Reporting W/Account Schedules for Dynamics 365 Business Central


31mar01aprTraining Class: Financial Reporting W/Account Schedules for Dynamics 365 Business Central

07apr10:00 am10:30 amBoost Seller Productivity and Close More Business with Dynamics 365 Sales

07apr2:00 pm2:30 pmEnsuring Quality for Batch Manufacturers

08apr11:00 am12:00 pmConfab with Stoneridge - Livestream - Jumping into the Deep End of the Data Lake

14apr10:00 am10:30 amThe Modern Manufacturer: Cost Accounting in D365

21apr12:00 pm1:00 pmGetting Started with Barcode Scanners and WMS Apps for Business Central

22apr11:00 am12:00 pmConfab with Stoneridge - Livestream - Moving from Manual to Automated with Strategic Automation Strategies

28apr10:00 am10:30 amThe Modern Manufacturer: Best Practices for Inventory Turn

28apr12:00 pm1:00 pmPower Up Microsoft Dynamics by Automating Budgeting, Dashboarding and Reporting

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!