Dynamics 365 SCM Warehouse app pop-up windows
We faced an issue with pop-up windows in our current WHS App version. (2.0.11.0)
In our case, we used a warehouse transfer flow with the various default values setups. For instance, one of the setup options is presented on the screenshots below:
It seems there are two options to solve this issue:
Let’s discuss the second option if it is applicable for you.
If we take a look at the user session XML we will see that the Inventory status and To warehouse controls have the DisplayArea tag value - PrimaryInputArea :
<Control InputType="5760" Footer2="" Footer1="" InstructionControl="" AttachedTo="" DataSequence="5" DisplaySubPriority="81" DisplayPriority="90" PreferredInputType="Selection" PreferredInputMode="Manual" DisplayArea="PrimaryInputArea" NumDecimals="-1" Status="1" color="#0076E5" selected="Available" enabled="1" defaultButton="0" error="0" length="-1" type="Undefined" data="||Available||Blocking||Not avail||Rejected" newLine="1" label="Inventory status" name="InventStatusId" controlType="combobox"/>
<Control
InputType="9259"
Footer2="" Footer1="" InstructionControl=""
AttachedTo="" DataSequence="6"
DisplaySubPriority="0" DisplayPriority="0" PreferredInputType="Alpha" PreferredInputMode="Scanning" DisplayArea="PrimaryInputArea" NumDecimals="-1" Status="1" color="#0076E5" selected="25" enabled="1" defaultButton="0" error="0" length="-1" type="Undefined" data="15||25" newLine="1" label="To warehouse" name="ToWarehouse" controlType="combobox"/>
The rule seems to be: If the combo box control is in the primary area, a pop-up window will appear.
In order to change the DisplayArea tag we need to create an extension for the WHSMobileAppServiceDecoratorRuleDefaultDisplayArea class. It has some methods and delegates in order to define the control area, for instance:
• isComboboxInPrimaryInputArea and isComboboxInPrimaryInputAreaDelegate for Combobox controls (e.g. units, inventory status and others including developed combobox controls)
• isTextInPrimaryInputArea and isTextInPrimaryInputAreaDelegateisTextInPrimaryInputAreaDelegate for Text controls (e.g. batch number, sales order id and others developed added text controls)
protected boolean isComboboxInPrimaryInputArea(boolean _enabled,
NOTE: The code above is an example. The mobile device flow types, and other important conditions are not considered. Please, do not use this code in real implementation projects as it is. It must be adjusted for the real scenario.
After these changes we should not see pop-up window for the Inventory status and To warehouse controls anymore and the user session XML will change as follows:
<Control InputType="5760" Footer2=""
Footer1="" InstructionControl="" AttachedTo=""
DataSequence="5" DisplaySubPriority="81" DisplayPriority="90" PreferredInputType="Selection" PreferredInputMode="Scanning" DisplayArea="InfoAndSecondaryInputArea" NumDecimals="-1"
Status="1"
color="#0076E5"
selected="Available"
enabled="1"
defaultButton="0" error="0" length="-1" type="Undefined" data="||Available||Blocking||Not avail||Rejected"
newLine="1"
label="Inventory
status" name="InventStatusId" controlType="combobox"/>
<Control InputType="9259" Footer2=""
Footer1="" InstructionControl="" AttachedTo=""
DataSequence="6" DisplaySubPriority="0" DisplayPriority="0" PreferredInputType="Alpha" PreferredInputMode="Scanning" DisplayArea="InfoAndSecondaryInputArea" NumDecimals="-1"
Status="1"
color="#0076E5"
selected="25"
enabled="1"
defaultButton="0" error="0" length="-1" type="Undefined" data="15||25" newLine="1" label="To warehouse" name="ToWarehouse" controlType="combobox"/>
I am glad if this finding can help someone to save their time.