Warehouse management for Dynamics 365 offers incredible flexibility for capturing data. One such instance of this is the ability for warehouse workers to capture data while they’re picking orders. Traditionally, you define your picking work template by using the work types of ‘Pick’ and ‘Put’, however, a type of ‘Custom’ can be added between these steps to allow workers to record information while they process their work. Below is a guide to creating a custom work type and how it can function to capture input and even make data updates with a simple modification.
Create a Custom Work Type
- Warehouse management > Setup > Work > Custom work types
- Click New
- Custom work type – the name of your custom work step
- Description – more detail as to the purpose of this custom work type
- Capture data – Data that you would like the user to insert between the pick and put
- Mobile device menu label – text that is displayed on the form where the data is displayed
- Custom method – If you want a custom method to be executed in between the pick and put.
Apply your custom work type
- Now that your new Custom work type exists, it needs to be assigned to a work template. Note that the custom work type must not be the last step in your work template.
- Warehouse management > Setup > Work > Work templates
- A custom work type that captures input will be presented to the warehouse worker during picking and they can enter in the prompted information.
- The information that the user enter will be stored on the work. Go to the Work record, click the Custom line and Custom data.
Extending a custom work type
- A custom work type can also be configured to run custom code at the time of executing. The ‘Custom method’ field holds the name of the method that should execute. A developer can then implement WhsIWorkTypeCustomProcessor and create their custom code to run using this method name.
- The code sample below shows how the implement class can be used. Note that the attribute in the header matches the method name from our custom work type. This is how the system identifies the method to run
- User picks the order and enters notes:
- After our custom method is run, the code takes the input from the warehouse worker and adds the note back to the order. This is a simple demonstration of the custom work type, however, this flexibility can greatly reduce development time should an extension in this area be needed.
- Hint: If you change the name of the Custom Method that you create the cache will need to be cleared in order for the form to think that it is a valid method.