Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 34 Next »

Description

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.

Overview

Use case

A developer can:

  • Inspect XML values and know whether AL code has taken effect
  • Reprocess failed mobile documents and initiate debugging
  • Inspect Error Call Stacks


Request and Response

When the mobile device communicates with Business Central, an XML document is sent to the system.

The XML contains the required instructions for Business Central to perform  


  1. It is always the Mobile device that initiates the communication with a Request
  2. Business Central generates a Response



Viewing XML Request and Response

Two large text fields display the current entry's Request and Response XML.

You can search the data using the browser "Find function", CTRL+F.

Download the XML data

Select the correct mobile document.

  • Select Document > Show Request XML
  • Select Document > Show Response XML




Example of Request XML 

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.

Here are a number of fields i.e. "MyDate", "MyText" visible in a request for an Unplanned Function named "MyUnplanned".

Request example
<?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>



View 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


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

  1. Select Process >  Process Document


  2. Select "Copy Details"

  3. Paste the text into a Text Editor like "Notepad" (Ctrl+V)



  • No labels