Versions Compared

Key

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

The request is likely most interesting for development. The request will give you an overview of which values are available to you and what they are named.

...

languagexml
themeEclipse
titleRequest example

Description

Excerpt

...

Use the document queue to inspect the XML data being sent to and from the Mobile devices. Also, error call stacks can be found here.

Column
width11
 

Overview

Table of Contents
maxLevel2
minLevel2
excludeOverview|Description

Column
width11

Image Removed

Overview

Table of Contents
maxLevel3
include.*How.*

Use case

During development, you may need to:

  • Inspect the values are available in the XML request you are reading
  • Know whether your code has taken effect

Flow

  1. It is always Mobile that initiates the communication with a Request
  2. Business Central is always the responding party

Image Removed

Inspect Mobile XML Communication

Go to the "Mobile Document Queue"-page.

  • Select Document 
    1. Select Document > Show Request XML
      or
    2. Select Document > Show Response XML

Image Removed

nameExcerpt

You can use the Mobile Document Queue List to handle and inspect failed mobile documents.

Finding the right mobile document

  1. Open Mobile Document Queue List

  2. Isolate for the right entry, using columns like Document Type, Registration Type or Status Filters

View Error Message and Call Stack

The Response XML contains both the Error message and Error call stack.

image-20241216-125518.pngImage Added

How to interpret the Error Call Stack

The beginning of the error call stack is where the process failed. This allows you to:

  • Isolate the source of the erroneous code

  • Identify where to set breakpoints for debugging, see Debugging

Third-party applications can be the cause of the error

The call stack can point to non-MobileWMS extensions. Look for "ExtensionName by Publisher".

This points to an issue outside of Mobile WMS. In Example, the Error Call Stack points to the Extension ShipIT 365 by IDYN B.V.

image-20241216-131017.pngImage Added

Share the Error and Call Stack with Tasklet

Tip

You can copy these files to the ticket if you have an ongoing Service Desk ticket and have trouble pinpointing the root cause of the Error.

Download the XML

image-20241216-134125.pngImage Added

  • Select Document > Show Request XML

  • Save the file

  • Select Document > Show Response XML

    • Save the file

Image Added

How to Reprocess Mobile Documents

You can reprocess failed mobile documents from the Mobile Document Queue List in Business Central.
This will show the error message on your screen.

Note: The code is executed in the context of the current user

  • Select Process >  Process Document

Image Added

Use “Copy Details” to view more additional information

When reprocessing fails, you will see the error on the screen.

More information is available in Copy details.

Image Added
  1. Select "Copy Details"

  2. Paste the text to a text editor or an ongoing Service Desk ticket if you have trouble pinpointing the root cause of the Error.

image-20241216-122619.pngImage Added

How to interpret Request XML 

The mobile app request is likely the most interesting for development. The request shows the values available.

Here are fields "MyDate", "MyText" available in a request for an Unplanned Function named "MyUnplanned".

Code Block
languagexml
<?xml version="1.0" encoding="utf-8"?>
<request name="PostAdhocRegistration" created="2020-02-14T15:24:24+01:00" xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Request">
  <requestData name="PostAdhocRegistration">
    <MyDate>14-02-2020</MyDate>
    <MyText>2</MyText>
    <MyDecimal>4</MyDecimal>
    <MyDateStep>14-02-2020</MyDateStep>
    <MyTextStep>2</MyTextStep>
    <MyDecimalStep>4</MyDecimalStep>
    <RegistrationType>MyUnplanned</RegistrationType>
  </requestData>
</request>

...

Inspect Error Call Stack and Debug

When a request ends in Status: Error, it will remain so until it succeeds. Subsequent attempts from mobile will only attempt to re-process this original request.

You can use this to inspect the Call stack and initiate debugging.

Go to the "Mobile Document Queue"-page.

  • Select the latest Document with Status = Error
  • Select Document > Show Response XML
    or
  • Select Process >  Process Document

Image Removed

You can also re-run the process and get the error on the screen

...