Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
 

1: Error messages

 

Error messages are supported everywhere. 

 

Description

Excerpt

You want to prompt the user to Confirm a message.

Table of Contents
maxLevel2
excludeDescription

Error Message

Simply perform the “ERROR()” command in NAV and the message will be shown on the scanner as an error.

 

 

 

 

2: Warning/Confirmation/Message

 

When a warning is wanted, the string ”ForceWarning” can be prefixed to an Error message.
Code Block
languagedelphi
titleExample
ERROR('This is an error message');

Confirmation Dialog

To display a confirm dialog,  you prefix the error message with”ForceWarning:” 


The process flow is:

  1. This will produce a warning, that the user can choose to ignore.
    If the user ignores the warning, the request is Automatically Repeated The user can Cancel or Confirm

    1. Cancel will return the user to the previous screen
    2. Confirm will automatically repeat the result, but this time with a “Force” tag included

  2. The Force tag tells the backend that the Process can now be completed and NOT halted by the ERROR command.

 

Example
  1. .

Below is the XML Request from the mobile device to the backend.

  • Note how a <Force> tag is included.
    • Use this to determine whether to issue the ERROR.
    • If the Force tag is included, do NOT run the ERROR, because this is the second "round trip", telling you that the user selected Confirm
    • See code example below


Image Added

Code Block
languagedelphi
titleExample in NAV/365BC
IF NOT Force THEN BEGIN
  ERROR('ForceWarning:' + STRSUBSTNO(MobWmsLanguage.GetMessage('QUANTITY_ERR'),Quantity,ActualQty));
END;

 

 

Image Removed

Image Removed

 

Image Removed

Image Removed

 

Info
iconfalse
The "Dual dialogue" cannot be avoided when using Windows Embedded

 

 

 

Please note

 

Warning

"ForceWarning" feature is only supported on the initial answer sent to the mobile device.

So in OrderLines scenario, the warning is done in Codeunit TF Mobile WMS Order Locking

Info
titleExample code in NAV/365BC

“Unplanned Count” in Codeunit “TF Mobile WMS Adhoc Registr."

Image RemovedImage Removed

 

Display dialog when opening an Order

Show a Confirmation Dialog when opening a planned function e.g. Receive, Pick etc.

Image Added


Modify function GetLockOrderNoAndPrefix_FromBackendID in Codeunit MOB WMS Order Locking


  1. Add a new XMLNode variable "XMLForceNode"
  2. Add the following code.


Code Block
languagedelphi
titleExample
IF MobDocQueue."Document Type" = 'LockOrder' THEN 
  IF UPPERCASE(MobXMLMgt.FindNodeAndValue(XMLRequestDataNode,'Force',XMLForceNode)) <> 'TRUE' THEN 
    ERROR('ForceWarning:My message here');


Image Added


Display dialog when posting an Order

Show a Confirmation Dialog when posting a planned function e.g. Receive, Pick etc.

Image Added


This example is for Whse. Receipt.

  • Add the following to Codeunit "MOB WMS Receive" and function "PostWhseReceiptOrder"
  • Add local text variable "ForceText"

Code Block
languagedelphi
titleExample
IF NOT MobXMLMgt.GetAttribute(XMLOrderNode,'force',ForceText) then 
  ERROR('ForceWarning:' + 'My message here');


Image Added


Display dialog based on AdHoc Action

Image Added

Modify function PostAdhocRegistration in Codeunit MOB WMS Adhoc Registr.


Code Block
languagedelphi
titleExample
IF NOT Force THEN BEGIN
  ERROR('ForceWarning:' + STRSUBSTNO(MobWmsLanguage.GetMessage('QUANTITY_ERR'),Quantity,ActualQty));
END;

Image Added


Add the follwing action on a page i Mobile Configuration Files

Code Block
languagedelphi
titleExample
<page>
  <..> 
    <actions>
      <adhocRegistration id="ShowComments" icon="attachment" title="Show Comments" registrationType="ShowComments"/>
      <..>

Notes

  • Line breaks / Carriage Return, can be performed by using the "\" character in NAV/BC.
  • “Unplanned Count” in Codeunit WMS Adhoc Registr.
  • When opening a Receive/Pick/Put-away/Move Order, the warning is performed in Codeunit WMS Order Locking


Image Added

An error message


Image Added

A confirm dialog, using "ForceWarning"