Saturday, December 20, 2014

Tutorial: Auto-Complete functionality on form controls


I guess all of you are familiar with the Auto-Complete feature present in Dynamics AX. Whenever you type in a repeated value in a control on AX forms, an automatic suggestion pops up next to the entered characters and the user can choose to accept the suggestion (for example, by tabbing out of the control).
There are methods on the form (specifically, the FormRun class) that provide you with a more tight control over the auto-completion list available to the user, and this blog post will describe the behavior of these methods, as there are a few not obvious things there.

Method signature Method behavior description
getAutoCompleteString(int _elementIndex) Retrieve the auto-complete string saved under the specified index in the auto-completion list of the form.
The indexing is not control-specific, and is not very efficient at keeping the number of values in the list low, so you will see values from multiple controls here.

The method returns a container containing 2 values:
- the auto-completion string value
- the index of this string in the auto-completion list
getAutoCompleteString(int _startIndex, FormControl _control, str _searchStr) Retrieve the auto-complete string for the specified control, finding the first one in the list starting from the specified startIndex + 1.

If _searchStr is also specified, it will find the first matching entry in the list with index > startIndex. This is the closest behavior to what happens when a user types in a certain character in the entry control on the form and the kernel needs to search and populate the auto-complete value for it.

Note: There’s a small bug in this function, where it does not return the full string value for longer texts. A workaround is to use the above “overload” and retrieve the full value by index.
setAutoCompleteString(string _string, anytype _control) The first argument is clear, and that is the auto-completion string to add to the list of suggestions.

The second argument is presented as _control, but can accept either an instance of a FormControl, or an integer value of the list item index to set.

If the _string already exists in the auto-completion list for this control, nothing will happen. If it does not exist, a new item will be added to the list (number of items cannot exceed 300) with the next available index.
setAutoCompleteString(string _string, anytype _index) The auto-completion list item at index _index will be updated in the list with the specified _string value.

This method “overload” basically allows you to override a particular value in the list with a new value.
delAutoCompleteString() Deletes all auto-completion items from the list, regardless of which control they are bound to, if any.
delAutoCompleteString(anytype _index) Deletes the item with the specified index from the auto-completion list.
delAutoCompleteString(anytype _control) Deletes all auto-completion items for the specified control from the list.

When a value in one of the controls on the form is modified, this value is also automatically added to the auto-completion list. With the above methods, however, you can control, if this value should actually stay there, or be immediately removed.
This way you can, for example, restrict the user to only be provided with auto-completion hints from a certain list (similar to IntelliSense).

I created a simple form to demonstrate all the above methods in action.

Tutorial auto-complete capabilities form
Tutorial form to demo auto-completion capabilities

You can download the form from my OneDrive.


Apart from the above methods, there is also a global setting which allows you to control auto-completion list availability for a particular user. This is control on the User options screen, as highlighted in the below image:

Autocomplete in User options
User options form


If this check box is not set, auto-completion suggestions will not be shown to the user when entering data on forms, even though the auto-completion list is still maintained behind the scenes.

Wednesday, December 03, 2014

Tip: Connecting the Warehouse management device portal to a different company or partition in Dynamics AX

As a follow up to my blog post about fixing an annoying error with the warehouse mobile device portal (see original post here), I got a number of people asking the following question:
"How do I install/configure the mobile portal to work in more than one company/partition?"
This is possible, and relatively easy, even though it might not be the most intuitive thing to do. Here's a quick walk-through of allowing work users to access another company account portal.

The Warehouse mobile device portal (WMDP) as of today only supports connecting to a single company account in a single partition. This is driven by the Active directory account used as the identity for the IIS application pool that is used to run the WMDP.

Which means that in order to access another company, we need to:

  • Create another Active directory account
  • Install another instance of the WMDP
    • Use a different port number than the ones already installed
    • Use the above AD user as the identity for the app pool
  • Add a user in AX for the above Active directory account
    • Do it in the partition you want to connect to
    • Set the default company to the one you want to connect to
    • Don't forget to assign the correct security role
    • Hint: You can also set the default user language, which will impact the WMDP site as well
  • Create all the necessary Warehouse management data in the new partition/company. That includes the Display settings, Warehouse workers and mobile device users, warehouses, etc.

Note, that you should avoid having the same AD user (used for WMDP) be part of multiple partitions. Only the first partition (alphabetically) will be connected to, but it becomes confusing for people looking at the data.


Once these steps are complete, you should be able to use the new link (with the new port) to connect to the mobile device portal and log in as a work user from the new company account.

Monday, October 13, 2014

Tutorial: High level overview of entity statuses in the new Warehouse management solution

I’ve seen a number of questions on the community and yammer groups asking about the statuses for Loads, Work, etc, where people were not sure what that means. I dug up this document with a brief description of all the possible statuses for Loads, shipments, Waves and Work in the new solution.

Hope you guys find it helpful, as I did at some point.

Load
  • Open: Load has been created, but no other warehousing processes have been executed on the load. Some or all load lines are not part of a shipment.
  • Posted: Load has been released to warehouse; related load lines have been assigned to shipments. These shipments may or may not be on a wave. If on a wave, the wave has not been executed.
  • Waved: Shipments tied to the load have been assigned to a wave, and the wave was executed. Any work that was created through the waving process has not been started.
  • In Process: Work tied to the load has started being executed, but does not meet the qualifications for an “In Packing” or “Loaded” status (see below).
  • In Packing: Work has been created for the entire quantity of load lines. All work has been put down to the manual pack station.
  • Loaded: Work has been created for the entire quantity of load lines. If not using a packing flow, all work has been put to a final shipping “baydoor” location. If using packing, all containers have been closed (All quantity tied to the load is picked against the appropriate sales/transfer orders).
  • Shipped: Load has been ship confirmed.
  • Received: For inbound loads, product receipt has been run for all quantity tied to the load.
Shipment (similar to load)
  • Open: Shipment has been created, but no other warehousing processes have been executed on the shipment.
  • Waved: Shipment has been assigned to a wave, and the wave has been executed. Any work that was created through the waving process has not been started.
  • In Process: Work tied to the shipment has started being executed, but does not meet the qualifications for an “In Packing” or “Loaded” status (see below).
  • In Packing: Work has been created for the entire quantity of load lines associated with shipment. All work has been put down to the manual pack station.
  • Loaded: Work has been created for the entire quantity of load lines associated with shipment. If not using a packing flow, all work has been put to a “baydoor” location. If using packing, all containers have been closed (All quantity tied to the load is picked against the appropriate sales/transfer orders).
  • Shipped: Shipment has been ship confirmed.
  • Received: For inbound shipments, product receipt has been run for all quantity tied to the shipment.
Wave
  • Created: Wave has been created. The wave may or may not have shipments assigned to it, but it has not yet been executed.
  • Executing: The wave is in the process of being executed. (Useful status for long running waves)
  • Held: The wave has finished executing, but has yet to be released. Any work that was created during the execution process is frozen, preventing it from being started until the wave is released.
  • Released: Wave has been released. Any work tied to the wave is unfrozen and able to be executed.
  • Picked: All work tied to a wave has been completed.
Work (Applies to both work header records and work detail lines)
  • Open: Work or work line has been created, but not started by a worker.
  • In Process: Worker has started work or work line, but not completed either.
  • Pending Review: Specific to cycle count work header only. Occurs when worker counts incorrect quantity or dimensions, but does not have the rights to automatically adjust inventory.
  • Skipped: Applies to work lines only. Status is applied when worker uses the skip option on the RF to cycle through the execution of work detail lines.
  • Closed: Work or work line has been completed.
  • Cancelled: Work or work line has been cancelled.
  • Combined: Applies to work header only. Occurs when executing the “Pick & Pack” RF flow which combines multiple work units into a single one.

Monday, September 22, 2014

Tutorial: Update product receipts for loads and how to handle items missing from ASN

In my post about the ability of receiving a mixed pallet through the License plate receiving method on the mobile device, I mentioned that once the receiving and put away is complete, the next step would be to update the product receipt document. With that, the purchase order status is updated to Received and all relevant GL postings are done.

Posting a product receipt for a load can be done from two places in the new warehouse management module:
  • For a selected load, whether that is from the All loads list page, Load details or from the Load planning workbench. This will execute the posting right away
  • For 1 or more loads, running as a batch job in the background, using the periodic operation "Update product receipts"
The actual business flow is more or less the same regardless of where you launch the update from, and I am going to describe it below, also doing a small demonstration of the forms and data that are relevant.

One thing that I specifically want to call out in this blog post is a piece of functionality related to receiving ASN documents, namely the receiving exceptions for items missing from ASN.

Preparation

So, i guess it's clear that the first step for us to look into the product receipt process is to get a load created and corresponding work created/executed for it. This is described in my post about importing an ASN and using License plate receiving to register their arrival and complete the put-away, so I will start here by just briefly listing the data I am going to work with in this demo:
  • A load with 2 purchase orders on it, with shipping carrier specified as JB Hunt:
    • PO #1 with 1 line for item 000148_202, qty = 2 PL (150 ea), WH = 42
    • PO #2 with 1 line for item 000147_202, qty = 1 PL (100 ea), WH = 42
  • A packing structure for this load (based on ASN received from the vendor)
    • 1 pallet with License plate LP2POs006
      • 75 ea of 000148_202
      • 100 ea of 000147_202
    • 1 pallet with License plate LPMissASN001
      • 75 ea of 000148_202
  • Work is created and executed for LP2POs006 through License plate receiving
    • LPMissASN001 has not been received, as it did not actually arrive on the truck.
What the last line essentially means is that the vendor planned to and believes he sent us the entire order (thus it is in the ASN document), but in reality, one of the pallets is missing. So somebody needs to get notified about this exceptional situation and act on it, ensuring we do not get billed for the missing goods.

In order to showcase the receiving exception related to items missing from load as compared to the ASN I have also specified the corresponding work exception code in the Warehouse management parameters, as shown below:

Warehouse management parameters

Flow description

The "Update product receipts" menu item is located under Warehouse management \ Periodic, and opens into a dialog, where you can select the loads you want to post product receipts for. The criteria could be, for example, the shipping carrier bringing in the loads. If you know that "JB Hunt" delivers before lunch, we can try posting product receipts for their deliveries at, say, 2 pm.

Note

The batch job flow is per my understanding going to be used more often, so this is what I am going to describe in this post. Manual posting is pretty much identical, with 1 difference mentioned below.


Once you confirm the processing, the job will be added to the queue on the batch server, and will be executed based on the recurrence you have selected on the Batch tab page.
For this demo I have not enabled it to run in the batch, so the execution happens right away.

Here's an attempt at capturing what is going to happen with the selected loads when you schedule the product receipt update for them:

  • Loop through all the selected loads
  • If Load has not yet been Received
    • check if the load has been ship confirmed, or the state of the related route (TMS functionality) if a load is part of a route. If it is not confirmed
      • ship confirm the load and all related loads that need to be confirmed at the same time (because they are on the same route)
        • if at least one of these loads cannot be ship confirmed, none of the loads will be confirmed. A number of things are checked here, but they are part of the transportation management flow, which is not the focus of this post, so I will omit describing them
      • As a result, the status of the load changes to Shipped 
    • check the document status of the purchase orders related to the load
      • if the purchase order is not confirmed, confirm it.
    • This entire step is executed within 1 transaction, while the below steps are part of another transaction. So if you for example cancel the actual product receipt, your loads would stay ship confirmed.
  • Loop through the load lines
    • Compare the load line to the related ASN item lines, finding discrepancies between the "planned" receiving quantity on the load line and the quantity work was actually created for based on the ASN packing structure. To rephrase, we compare, how much we ask the vendor to deliver in the selected load and how much he actually delivered.
      • If a discrepancy is found, create a receiving work exception with exception code selected in Warehouse management parameters \ Code for missing items from ASN
Note: We currently do not record the actual quantity discrepancies, just that there was a difference, as well as the load and order line information
    • For each purchase order linked, prepare the order for posting product receipt. All load lines will be posted as part of 1 large update, so if multiple orders exist they will be posted in 1 go, with the same ParmId.
      • Actually post the product receipt for all relevant orders. 
        • Display the Posting product receipt dialog. Note the product receipt IDs are generated as _#, so you should be able to later identify all product receipt documents posted for a load based on such a condition (if you do not override the number with the actual vendor IDs)
        • Select to update only the Registered quantity, as that is what we have received according to the warehouse
        • As a result, the status of corresponding purchase orders is updated to Received, or stays Open if some of the quantity was not received in full. 
      • Update the load, removing load lines that were not received at all and decreasing quantity on those that were only received partially.
  • Update load status to Received
    • Update status of all shipments that are part of the load to Received

Manual posting difference

When posting the product receipt manually, the button to post is actually disabled until the purchase orders in the load are all in Confirmed status.

Demonstration

Navigate to Warehouse management \ Periodic \ Update product receipts, and configure the criteria for updating all loads delivered by JB Hunt that have not been Received yet. 

Update product receipt selection criteria
When you confirm the update, the above flow is going to execute, confirming the inbound shipment and displaying the product receipt posting dialog with both purchases shown. Notice the product receipt numbers assigned, and that only the registered quantity is updated. Confirm the processing.

Product receipt posting dialog
Once the update is complete, we can go back and check on the load. As you can see, the Load Status has changed to Received, and the quantity on the first load line has been decreased to match what we actually received.

Received load information
At the same time a receiving work exception has been logged in the system, pointing to a discrepancy of type "Missing item from ASN", as shown below:

Work exceptions log
If you now take a look at the purchase orders from the All Purchase orders list page, you will see that one of them was fully updated and thus has a status of Received, while the other is still Open and has an expected delivery for the quantity that was missing from the ASN. We'll now need to contact the vendor/carrier and figure out what went wrong with this shipment.

Youtube video walkthrough

As an experiment, I have also recorded the above flow in a screen cast and uploaded it to my Youtube channel. Take a look and let me know what you think. Is that helpful at all? (I take any kind of feedback very well :))

Summary

This post was trying to address two main goals:
  • Explain and demonstrate, what happens behind the scenes when posting a product receipt for loads
  • Show, how you can set up a receiving exception, that will allow more easily tracking cases where something went wrong and we did not get the goods we were supposed to.
I hope it's more clear now and you'll be able to use AX to the full extent when it comes to inbound ASNs.

Tuesday, September 16, 2014

Tutorial: Generating shipping labels using the GS1 SSCC-18 barcode format

As a follow up to my previous post about printing labels using the new WHS solution, I wanted to describe an extra feature that is available out of the box in the new Warehouse management solution and allows to generate the license plate shipping label in the format of an 18-digit serial shipping container code (SSCC), which is "used by many companies to identify a logistics unit, which can be any combination of trade items packaged together for storage and/or transport purposes; for example, a case, a pallet or parcel.", as quoted from GS1.

Here is an example of an SSCC-18 barcode (description of each of its components is provided here):

Configuring the SSCC in Dynamics AX

Let's take each part of the code above and see where we set it up in Dynamics AX:


  • Application Identifier for SSCC is always 00 and is therefore also hard-coded in the X++ code
  • Extension Digit in AX is used to specify the type of the logistics unit - pallet, case, etc. This is set up in the Unit sequence groups by specifying a digit 1-9 in the field License plate packing type, and is during work execution retrieved based on the item being processed. If no item is specified, Extension Digit will be set to 0.

Note

There is currently no validation implemented for this field, meaning you can type in any integer. Typing in a value that is more than 1 digit will obviously compromise your SSCC integrity

Here is how I have set up my Unit sequence group "Ea PL" for this demonstration:


  • GS1 company prefix is set up in the Warehouse management parameters and thus will be unique per company in Dynamics AX.

Note

There is currently no validation implemented for this field, meaning you can type in any string with a length of 8 or less characters. The requirement is of course that you only type in numerical data. Note also that according to the standard, the company prefix can be as large as 10 digits, which is not supported in AX right now, but is rather easy to customize if necessary.

Here is how I have set up the GS1 company prefix for this demonstration:


  • Serial reference is currently only set up to be generated based on a number sequence for License plate IDs. Many people request that the Container ID (used as part of manual packing or containerization flows) is used instead, but that's as of right now not possible and requires a customization. 

Note

There is currently no validation implemented to ensure the length of the generated number is within the required 6-9 digits, or that the generated string actually only consists of digits. It is therefore your responsibility to ensure the corresponding number sequence segments are set up correctly, ensuring that the combined length of GS1 company prefix and generated license plate ID is always 16 digits.

Here is how I have set up the License Plate ID number sequence for this demonstration:


  • The check digit is calculated automatically based on the generated ID and appended as the last symbol. No extra setup is required for this.

Mobile device menu item configuration

In order for all of the above to work, we need to make sure that the license plate is generated automatically by selecting the "Generate LP" check-box on the corresponding mobile device menu item.

Here is how I have set up the menu item for executing sales picking work for this demonstration:



OK, that's pretty much it. Now every time that a new target license plate is generated as part of picking sales orders, it will be in the format of a serial shipping container code. All you need to do is actually configure the work template to print the license plates, as shown in the above-mentioned post about printing labels.

The same will apply not only to sales picking work, but to many other types of mobile device flows, which as part of the flow generate a new license plate, both inbound and outbound.

Actual demonstration

To start off, I have configured the work template for sales orders to include an additional step to print the label, as shown on the screenshot below:


Next, I created a new sales order for 75 ea of item 000148_202, where a unit conversion is set up so that 1 PL = 75 ea. The order line is to be dispatched from warehouse 42, as shown below:


I reserve the line (you need to ensure there is sufficient on-hand inventory available for item 000148_202, and it is in a location, which is part of your location directives setup for Sales order picking), and release the order to warehouse, which, in turn, based on my wave template, creates a new wave and processes it, resulting in the creation of picking work that is shown on the image below:


As you can see, the Print steps is there, and the work lines are for 1 PL, which means that when printing the label, PL will be used to determine the value of the Extension digit.

Since the actual printing is already described in my previous post, I will use a different approach this time and will not setup the document routing at all. This will generate the label for me, but won't actually print it.

OK, so now let's proceed and actually execute the work. At the Pick screen, you will see the generated license plate ID, and can confirm that the format is right.


Note

The field is currently editable, so the work user can accidentally overwrite the generated value. This might improve in future AX releases to prevent human error.

Hotfix

I am afraid the contents of the generated ID are a bit off at the moment. If you type in the below SSCC code into a check digit calculator (e.g., here), you will see that the calculator produces a different check digit as compared to Dynamics AX. This is a product issue Microsoft is aware of, and it has been hot-fixed since RTM. The KB article number is 3001157 (should be available on LCS soon).


Once the Pick line is executed, the printing itself will happen, and will create a record in the License plate labels table. Go ahead and complete the Put, and let's review the label information that was persisted by navigating to Warehouse management \ Inquiries \ License plate labels. I took the liberty of hiding the uninteresting fields from the view.


As you can see, all the vital information about the license plate label, as well as the context in which this label was generated are stored, and can be used in the future.
You can, for example, reprint the label, if necessary, using a mobile device menu item with an Activity Code = Reprint label

That's it for today! Stay tuned for more.