Friday, July 10, 2020
Dynamics 365 Finance and Supply Chain Management has evolved the applications to make it easier for organizations to manage specific business functions. As an ISV Development Center, we are in a great position to provide our Dynamics Partners and customers with the latest features of WHS mobile device development to ensure that they are always up to date. Using the Process Guide framework enables the warehouse mobile processes to be more efficient, more developer-friendly, and helps to avoid development errors by simplifying syntax.
To help you get more from the Process Guide framework, we have created a four-part blog series to provide information about the process guide framework for developers who are working on the warehouse mobile device processes to show how this business process can be extended. Throughout this blog post, we’re going to expand on the knowledge provided in our previous blog post series on WHS Mobile Device Development. Throughout this blog series, we will introduce you to the process guide development and we’re going to use it to implement a list window, similar to what was explained in the previous blog post.
Check out the video below for a preview of the result of what we will cover throughout the blog series to help you achieve success with your mobile device development process:
The goal of our solution is to create a new process for mobile device development using the process guide framework consisting of three steps:
1) Select a sales order
2) Display a list of sales order lines for the selected order
3) Display sales line details
Figure 1. WHS mobile device process flow
Dynamics 365 WHS Mobile Device Development: Creating a New Process
To create a new process, you will need to make some adjustments to the standard so that you can create a Mobile device menu item record that has a process guide framework enabled. The first thing you need to do is to extend a few enums for your process: WHSWorkExecuteMode and WHSWorkActivity or WHSWorkCreationProcess, depending on what kind of process you are creating (Work-related or indirect).
Once you have extended the standard enums, you can now enable the process guide functionality for the process by modifying WHSRFMenuItemTable.workActivityMustUseProcess GuideFramework() method:
final class ERAWHSRFMenuItemTable_Extension
protected boolean workActivityMustUseProcessGuideFramework()
boolean ret = next workActivityMustUseProcessGuideFramework();
if (!ret && (this.WorkCreationProcess == WHSWorkCreationProcess::ERASO || this.WorkActivity == WHSWorkActivity::ERASO))
ret = true;
Note: here ERASO are newly created enum values
This will automatically enable process guide functionality for this process:
Figure 2. Configuring Mobile device menu items for this process
Dynamics 365 WHS Mobile Device Development: Creating the Main Classes
The mobile device development approach using this process guide is quite different, although, under the hood, previous versions run similar processes. Now the code is divided into small and logical classes that simplify mobile device development.
The backbone of the process guide development is the step classes and the process controller. The controller class orchestrates the overall execution of the business process. Each step has its *Step and *PageBuilder classes. The first one is responsible for defining and instantiating framework classes as well as executing the step processes, whereas the page builder class is responsible for instantiating the user interface.
For our example we will create these main classes:
Figure 3. Main classes used in this example
We link the controller with our process by specifying WHSWorkExecuteMode attribute and providing our new execute mode as a parameter. In this class, we must indicate the initial step class and define the step sequence that will be followed throughout our process.
public class ERASalesProcessGuideSalesLineListController extends ProcessGuideController
protected ProcessGuideStepName initialStepName()
protected ProcessGuideNavigationRoute initializeNavigationRoute()
ProcessGuideNavigationRoute navigationRoute = new ProcessGuideNavigationRoute();
Note: At first your controller might not be recognized by the framework. If that‘s the case, try running this line of code using a job to clear the caches:
Dynamics 365 Finance & Supply Chain Management: Advanced WHS Mobile Device Development Overview
In this first installment of our blog series, you’ve learned how to enable a process guide for a custom process and have created a controller class for the new process which defines the step sequence for this process.
We hope that you have found this blog post useful and now have a better idea of how to use the process guide framework in WHS mobile device development. Please don’t hesitate to contact us at service@1ClickFactory.com if you have any additional questions or need help with your development projects!
Read part two in this four-part blog series on Dynamics 365 Finance & Supply Chain Management WHS mobile device development process.