Mobile Functionality in Microsoft Dynamics NAV

Mobile Development Tools Documentation
Mobile Functionality in Microsoft Dynamics NAV
See Also
DropDown image

Microsoft Dynamics™ NAV includes components that enable users to interact with the server from a mobile device. This includes the ability to create or modify sales orders while out of the office.

Note Note

To fully use this functionality, you must have installed and configured Microsoft Dynamics™ Mobile 2008 - Mobile Development Tools - Server Components and the database components for Microsoft Dynamics™ Mobile 2008 - Mobile Sales.

Available Mobile Functionality

When you install Microsoft Dynamics™ NAV, the following mobile functionality is available:

Defining mobile users

You can set up existing users to have mobile capability. For more information, see How to: Set Up Mobile Users.

Defining document types

Data between the mobile device and server is exchanged as XML documents. You must define document types in Microsoft Dynamics™ NAV that determine the data that can be exchanged. For more information, see How to: Set Up a Document Type in Microsoft Dynamics NAV.

Defining document schemas

To validate request documents, you can add document schemas to document types. For more information, see How to: Work with Mobile Document Schemas.

Defining document handlers

In Microsoft Dynamics™ NAV, codeunits handle incoming requests from mobile devices. For more information, see Creating Document Handlers in Microsoft Dynamics NAV.

Setting up Mobile Sales

Mobile Sales includes integration with the Microsoft Dynamics NAV application in a number of places. For example, Mobile Sales contains activities that interact with to-dos in the Microsoft Dynamics NAV application. For more information, see Mobile Sales Overview.

See Also

Concepts

Mobile Development Tools - Server Components Overview
Mobile Sales Overview
Working with Mobile Requests

Other Resources

Setting Up Mobile Functionality

Send comments about this topic to Microsoft.
© 2007 Microsoft Corporation. All rights reserved.


Mobile Development Tools - Server Components Overview

Mobile Development Tools - Server Components Overview
DropDown image

Microsoft Dynamics Mobile 2008 - Mobile Development Tools - Server Components handles and monitors the integration between business applications and mobile devices. The current release of Mobile Development Tools - Server Components integrates with the following products:

  • Microsoft Dynamics AX 4.0 SP1

  • Microsoft Dynamics AX 4.0 SP2

  • Microsoft Dynamics NAV 4.0 SP3

  • Microsoft Dynamics NAV 5.0 SP1

Alternatively, you can use Microsoft Dynamics Mobile 2008 - Mobile Development Tools to build integration objects for other business applications. For more information, see the Microsoft Dynamics Mobile Integration white paper.

Mobile Development Tools - Server Components Behind the Scenes

Mobile Development Tools - Server Components consists of the following elements:

Integration objects

Objects for each supported Microsoft Dynamics application that extends the application with mobile capabilities.

Services

Services for document handling, deployment, and event logging. The Mobile Development Tools - Server Components services enable you to deploy mobile applications to mobile devices, receive documents from the mobile devices, and to log and monitor events on the mobile devices.

SQL Server database tables

Database tables for supporting the deployment and logging services.

Console snap-ins

Microsoft Management Console snap-ins for the deployment and logging services.

To use Mobile Development Tools - Server Components, you must install and configure the components. For more information, see How to: Install Mobile Server in the Microsoft Dynamics Mobile Development Tools Installation and Configuration Guide.

Integration with Microsoft Dynamics Applications

Mobile Development Tools - Server Components provides a file with integration objects that is specific for each supported Microsoft Dynamics application. For example, the IntegrationObjects.xpo file contains all the necessary objects to interface with Microsoft Dynamics AX 4.0, and the IntegrationObjects_NAVW14.00.03.fob file contains all the necessary objects to interface with Microsoft Dynamics NAV 4.0. As part of the installation process, you import the file into the application to obtain all of the functionality that enables the mobile users to send request documents from the mobile device to the business application. For more information on the integration setup, see Integrating with Microsoft Dynamics in the Microsoft Dynamics Mobile Development Tools Installation and Configuration Guide.

Note Note

For Microsoft Dynamics NAV 5.0 SP1, the integration objects are part of the product, and you do not have to import external objects.

The way that Mobile Development Tools - Server Components integrates with the Microsoft Dynamics applications is product specific. For example, to communicate with Microsoft Dynamics AX, Mobile Development Tools - Server Components uses the integrated Microsoft Dynamics AX .NET Business Connector. To communicate with Microsoft Dynamics NAV, Mobile Development Tools - Server Components uses Microsoft Dynamics NAV Business Connector.

Note Note

Microsoft Dynamics NAV Business Connector installs with Mobile Development Tools - Server Components. For more information, see How to: Install Mobile Server in the Microsoft Dynamics Mobile Development Tools Installation and Configuration Guide.

Server Components Services

Mobile Development Tools - Server Components includes three services:

  • Document service

  • Deployment service

  • Logging service

You define the services during installation or you modify them later by using Internet Information Services (IIS) Manager, or by modifying the generated web.config files that store settings from each service. You can configure the services at any time after the installation, as required.

For more information, see Configuring the Mobile Server web.config Files in the Microsoft Dynamics Mobile Development Tools Installation and Configuration Guide.

Document Service

Mobile devices send data and requests back to the server as XML documents, called request documents. The document service handles request documents sent from the mobile device. A request is an activity that the mobile user has performed using a mobile application, such as to create a sales order or to define a new customer. You can configure the mobile application, such as Mobile Sales, to send data to the server immediately or when connectivity suits your needs.

For more information, see Mobile Sales Overview.

Deployment Service

The deployment service is the system administrator's key instrument in regards to deploying new mobile applications or sending updates to the mobile devices. For more information, see Deployment Scenarios in the Microsoft Dynamics Mobile Development Tools Installation and Configuration Guide.

Logging Service

The logging service sends data on all the events that occur on the mobile device. The system administrator can use the console snap-in for the logging service to view recorded events, and can customize the views to suit individual needs. The views can be listed in categories for a better overview of the many logs. The views can also be filtered according to the severity set on the log. For more information on the logging Web service, see Mobile Server Logging Manager Snap-in in the Microsoft Dynamics Mobile Development Tools Installation and Configuration Guide.

Communication between Server and Mobile Devices

When Mobile Development Tools - Server Components is appropriately configured, the mobile user can send data to the Microsoft Dynamics application. The mobile device can also receive updated data from the Microsoft Dynamics application through a synchronization process with the server. Synchronization takes place when the user prompts for an update.

Sending Data to the Microsoft Dynamics Application

When the mobile user completes an action in the mobile application, the data is gathered in an XML file and sent to a queuing system on the server that Mobile Development Tools - Server Components are installed on. Incoming requests are handled by the document Web service. Data can be sent from any mobile device with PDA capability running on the Windows Mobile 5.0 or 6.0 platform with Mobile Development Tools - Framework Components. The framework supports various types of network, including WiFi and cellular networks.

The mobile user can still continue to work while offline. The request documents are stored in a queue on the device until the device can connect to the network. The purpose of the queuing is to determine when the network connection is appropriate, to transmit the request documents.

The cost of network connection varies and you can set a priority on request documents to take this cost into consideration when you send request documents to the Microsoft Dynamics application. This process is called stamping. If the request is urgent, such as when sending an order, this request can be set to high priority, which means that it will be sent immediately regardless of the cost of network connection. Other request documents with less importance can be set to a lower priority and sent when the cost of network connection is lower. When all of the conditions are met in the queuing system, the document is sent to the Microsoft Dynamics application for further processing. You configure which stamps to assign to which requests in the UserRole.xml file for the mobile application. For more information, see Prioritizing Request Documents over Network Connection Types in the Mobile Orchestration Guide.

Receiving Data from the Microsoft Dynamics Application

Mobile users can update their mobile applications with data from the Microsoft Dynamics application so that they have access to the same type of information that is available to them at the office. However, the synchronization between the device and the database only includes the data that is required for that particular mobile application, so the amount of data is limited. Each mobile application that is based on Mobile Development Tools, such as Mobile Sales, is role specific, so the synchronization only involves the information that is needed to perform the tasks for this particular role.

As part of configuring the mobile application, you must map the table fields in the business application to the corresponding table fields in the mobile staging database.

Note Note

When you install Mobile Development Tools - Server Components or Mobile Sales, this includes SQL scripts that handle the field mapping of fields in the standard product. For an example of field mapping, see Field Mapping Between Microsoft Dynamics AX 4.0 and the Mobile Staging Database in the Microsoft Dynamics Mobile Development Tools Installation and Configuration Guide.

From the mobile staging database, data is sent to the reference database on the mobile device using merge replication. This process takes place based on a filtering of the tables in the staging database that only displays a subset of the data from the ERP system. For more information on how to configure the mobile staging database and to set up the filtering system, see Configuring the Mobile Staging Database and SQL Mobile Replication in the Microsoft Dynamics Mobile Development Tools Installation and Configuration Guide.

See Also

Concepts

Mobile Sales Overview


Mobile Sales Overview

Mobile Sales Overview
DropDown image

Microsoft Dynamics Mobile 2008 - Mobile Sales provides users with a mobile work place that gives them the flexibility to access and send data when they are away from the office.

Mobile Sales extends the capability of Microsoft Dynamics AX and Microsoft Dynamics NAV to mobile users. With easy access to data, and an application that only contains their daily tasks, the mobile user can respond to customer needs faster and can work more efficiently.

Working with Mobile Sales

Mobile Sales is a mobile application that is closely connected to specific roles and tasks for mobile users in sales and marketing.

For example, a salesperson can create and send orders, monitor customer accounts, and manage the daily meeting schedule. The salespeople can work more efficiently, because they can retrieve the latest information from the corporate database and send orders while they are still with the customer.

When Mobile Sales opens in the mobile device, the main tasks display as icons on the home page. These represent business activities, such as creating a new order. The mobile user navigates through the activities, which involve actions that are sent to the corporate system. The mobile user may also need to see the latest price list to give the customer accurate information, and so needs to synchronize with the corporate database. The following section describes what goes on behind the scenes when the mobile user performs such tasks.

Mobile Sales Behind the Scenes

In most cases, a system administrator, or super user, maintains and customizes mobile applications. You do not need to have programming skills to modify or customize the mobile applications, but you do need to have knowledge of XML to perform customization.

A mobile application is made up of a number of tasklets. Each tasklet represents one or more steps in a larger procedure. To tailor a mobile application to a particular role, the system administrator or super user modifies the orchestration in the UserRole.xml file.

The orchestration is an expression for arranging the tasklets in certain flows and sequences to reflect the business activities. A mobile application has multiple orchestrations and, together, they constitute the role-specific mobile application. For more information on how to perform orchestration, see the Mobile Orchestration Guide.

Configure settings of a more global nature, such as deployment and network connection, using the app.config file for the mobile application. Some of these settings are mandatory and are required to establish the connection to the server. For more information, see How to: Set Up the app.config File for Mobile Sales in the Microsoft Dynamics Mobile Development Tools Installation and Configuration Guide.

See Also

Concepts

Mobile Development Tools - Server Components Overview


Setting Up Mobile Functionality

Setting Up Mobile Functionality
DropDown image

Microsoft Dynamics NAV includes components that enable users to integrate with the application from mobile devices. The components range from setting up users and defining document types to integration with to-dos.

In This Section

How to: Configure NAV Application Server for Mobile Integration

How to: Set Up Languages for Mobile Users

How to: Set Up Mobile Users

How to: Set Up Mobile Groups

How to: Set Up Option Field Usage for Mobile Users

How to: Set Up a Document Type in Microsoft Dynamics NAV

How to: Work with Mobile Document Schemas

Mobile Security Roles

Creating Document Handlers in Microsoft Dynamics NAV

Mobile Sales Document Handlers

How to: Set Up Mobile Sales in Microsoft Dynamics NAV

How to: Enable Signatures on Sales Orders

See Also

Concepts

Mobile Functionality in Microsoft Dynamics NAV
Working with Mobile Requests
Extending Sales and Marketing with Mobile Sales


How to: Configure NAV Application Server for Mobile Integration

When Microsoft Dynamics Mobile 2008 - Mobile Development Tools - Server Components integrates with Microsoft Dynamics NAV, then Application Server for Microsoft Dynamics NAV must be set to run one of the following tasks:

The mobile document dispatcher

Receives requests from the mobile document service and stores them in the mobile document queue for either direct or later processing.

The mobile queue processor

Processes those requests in the document queue that have been stored for later processing.

To configure NAV Application Server to integrate with Mobile Development Tools, follow the steps in one of the following procedures:

Note Note

You must have created a user account for NAV Application Server. You can, for example, create a user account in your Windows domain or locally on a computer and set the NAV Application Server service to run as this account.

To configure NAV Application Server to use the mobile document dispatcher

  1. Assign the following roles to the NAV Application Server user account:

    • ALL

      This standard role grants access to fundamental tables and functions.

    • MOB-SERVER-NAS

      Mobile security role for NAV Application Server.

    • The appropriate roles for each document type that NAV Application Server processes.

  2. Start the NAV Application Server service with the MOB PORT=port number startup parameter.

To configure NAV Application Server to use the mobile queue processor

  1. Assign the following roles to the NAV Application Server user account:

    • ALL

      This standard role grants access to fundamental tables and functions.

    • MOB-SERVER-NAS

      Mobile security role for NAV Application Server.

    • JOBQUEUERUN

      This standard role enables users to execute jobs in the job queue.

    • The appropriate roles for each job in the job queue.

  2. Start the NAV Application Server service with the JOBQUEUE startup parameter.

See Also

Tasks

How to: Set Up Mobile Users

Concepts

Mobile Development Tools - Server Components Overview
Mobile Security Roles


How to: Set Up Languages for Mobile Users

How to: Set Up Languages for Mobile Users

When mobile users use mobile applications that integrate with Microsoft Dynamics NAV, error messages and values for option fields can be shown in the languages that the Microsoft Dynamics NAV application supports.

To set up languages for mobile users, you must first define which languages are available, and then you must specify which language each mobile user uses. You must also specify which tables with options fields are used in the mobile applications.

To set up languages for mobile users

  1. In the Administration section of the navigation pane, click Application Setup, Mobile, Languages.

  2. In the Mobile Languages window, in the Code field, click the AssistButton. The Languages window appears.

    Note Note

    The Languages window lists all languages that Microsoft Dynamics NAV supports. However, you should only set up those languages that your application has translations for.

  3. Select the primary language for your application, such as ENU for English (United States), and then click OK.

  4. Repeat steps 2 and 3 for any additional languages that you want to define.

The languages that you set up in the Mobile Languages window are available in the Language Code field in the Mobile Users window. For more information, see How to: Set Up Mobile Users. To display option field values in the appropriate languages, you must set up option field usage. For more information, see How to: Set Up Option Field Usage for Mobile Users.

See Also

Tasks

How to: Set Up Option Field Usage for Mobile Users
How to: Set Up Mobile Users

Concepts

Mobile Development Tools - Server Components Overview


How to: Set Up Mobile Users

How to: Set Up Mobile Users

You can set up users in Microsoft Dynamics NAV to access data from mobile devices. In the Roles window, you must first assign security roles to Windows logins to assign users access to mobile functionality. Then, in the Mobile Users window, you associate mobile logins with salesperson codes and language for the mobile application.

Note Note

Before you can set up mobile users, you must have set up one or more users in the Windows Logins window. For more information, see Creating Windows Logins in Microsoft Dynamics NAV Help. Alternatively, you can create database logins and then assign the users permission through Windows groups before setting them up as mobile users.

To assign mobile security roles to users

  1. Click Tools, Security, Roles and the Roles window appears.

    The Roles window lists all Microsoft Dynamics NAV roles. The list includes the following mobile security roles:

    • MOB-SERVER-NAS

    • MOB-SERVER-SETUP

    • MOB-SERVER-USER

    • MOB-SALES-CUST-PRICE

    • MOB-SALES-SETUP

    • MOB-SALES-SYNC-TODO

    For more information, see Mobile Security Roles.

  2. Select the role that you want to add users to, and then click Role, Windows Logins.

    The Windows Logins window for this role appears. This window lists all of the Windows users and groups that have already been given this role in Microsoft Dynamics NAV.

  3. To add a Windows user or group to the list, select an empty row.

  4. In the Login ID field, click the AssistButton, and the Windows Logins window appears.

    This window contains a list of all the Windows users and groups that can log on to Microsoft Dynamics NAV.

  5. Select the user that you want to assign this Microsoft Dynamics NAV role to and click OK.

    This user or group is added to the list shown in the Windows Logins window for this role.

To set up mobile users

  1. In the Administration section of the navigation pane, click Application Setup, Mobile, Users.

  2. In the Mobile Users window, in the User ID field, click the AssistButton, and the Mobile Users Windows Login window appears. This window contains a list of all the Windows users and groups that have been assigned a mobile security role, as described in the previous section.

  3. Select the user that you want to set up, and click OK.

  4. In the Mobile Users window, for the user that you have just added, fill in the following fields:

    Field Description

    Salesperson Code

    The salesperson code that the user is linked to.

    Salesperson Name

    The name of the salesperson. This field is read-only.

    Language Code

    The code for the language that is the primary language for this user.

    This field determines which language module to use for this mobile user. In order to display field values correctly, you must set up option field translations. For more information, see How to: Set Up Option Field Usage for Mobile Users.

The original Windows login is now a mobile user. To provide mobile users with access to mobile functionality, you must define mobile groups and add users to the groups. Mobile groups are used to provide users with access to work with mobile documents. For more information, see How to: Set Up Mobile Groups.

See Also

Tasks

How to: Set Up Mobile Groups
How to: Set Up Option Field Usage for Mobile Users
How to: Set Up Languages for Mobile Users
How to: Process Mobile Documents
How to: Modify a Mobile Document Before Processing
How to: Work with Mobile Document Schemas

Concepts

Mobile Development Tools - Server Components Overview
Mobile Security Roles
Working with Mobile Requests


How to: Set Up Mobile Groups

How to: Set Up Mobile Groups

When users in Microsoft Dynamics NAV are set up as mobile users, you can add them to mobile groups to make it easier to maintain permissions. For example, when you define a document type, you assign user permissions by adding one or more mobile groups to the document type.

Note Note

Before you can add users to mobile groups, you must have set up one or more users in the Mobile Users window. For more information, see How to: Set Up Mobile Users.

To define a mobile group

  1. In the Administration section of the navigation pane, click Application Setup, Mobile, Groups.

  2. In the Mobile Groups window, fill in the following fields:

    Field Description

    Code

    A code for the group.

    Name

    A descriptive name for the group.

You can now add users to the group.

To add users to a mobile group

  1. In the Mobile Groups window, select the group that you want to add users to, and then click Group, Users.

  2. In the Mobile Group Users window, in the Mobile User ID field, click the AssistButton. The Mobile Users window opens.

  3. In the Mobile Users window, select the user that you want to add to this group, and then click OK.

    Note Note

    You can only add one user at a time.

  4. Repeat steps 2 and 3 for the remaining users that you want to add to the group.

When you have added all of the relevant users to the group, you can use the group to assign user permissions to a document type.

See Also

Tasks

How to: Set Up Mobile Users
How to: Set Up a Document Type in Microsoft Dynamics NAV

Concepts

Mobile Development Tools - Server Components Overview
Mobile Security Roles
Working with Mobile Requests


How to: Set Up Option Field Usage for Mobile Users

How to: Set Up Option Field Usage for Mobile Users

Mobile applications that integrate with Microsoft Dynamics NAV can include fields where the possible values are option strings. To ensure that the options display correctly on the mobile device, you must first define which languages are available, and then you must specify which tables with options fields are used in the mobile applications. For more information, see How to: Set Up Languages for Mobile Users and How to: Set Up Mobile Users.

To set up option field usage for mobile users

  1. In the Administration section of the navigation pane, click Application Setup, Mobile, Option Field Setup.

  2. In the Mobile Option Field Setup window, in the Table No. field, click the AssistButton, and from the Objects list, select the table that your mobile application uses, and which has option fields, and then click OK. For example, the Item table.

  3. In the Mobile Option Field Setup window, in the row for the table you selected in the previous step, in the Field No. field, click the AssistButton, and in the Mobile Field List window, select the field that your mobile application uses. For example, the Costing Method field.

    The Mobile Option Field Setup window now contains the following information:

    Field Value

    Table No.

    The object ID of the table, such as 27.

    Table Name

    The name of the table, such as Item.

    Field No.

    The ID of the option field, such as 21.

    Field Name

    The name of the option field, such as Costing Method.

    Option String

    The values for the option field, such as FIFO,LIFO,Specific,Average,Standard.

  4. Optionally, to view available translations for the selected option field, click Field, Translations.

    The Mobile Option Field Setup window lists the translation for each option field value in the languages that you specified in the Mobile Languages window. If the option field does not include a translation for a selected language, it defaults to English (United States). For more information, see How to: Set Up Languages for Mobile Users. For more information about languages in Microsoft Dynamics NAV, see Chapter 23 Multilanguage Functionality in the Application Designer’s Guide.

    Note Note

    The strings only display in the specified language if you have translated strings in that language. For example, if your company is located in Spain, you have access to strings in English (United States) and Spanish. So if you want your mobile users to also have access to strings in Portuguese, you must add a language module with the strings translated into Portuguese.

  5. Repeat steps 2 and 3 for any additional languages that you want to define.

This completes the steps for setting up option field usage for the mobile application. If you have set up option field languages, and you have specified a language for each mobile user, the mobile user will now see options strings in the specified language.

See Also

Tasks

How to: Set Up Languages for Mobile Users
How to: Set Up Mobile Users

Concepts

Mobile Development Tools - Server Components Overview


How to: Set Up a Document Type in Microsoft Dynamics NAV

How to: Set Up a Document Type in Microsoft Dynamics NAV

In Microsoft Dynamics NAV, mobile users can send data from a mobile device to the server as request documents. To receive request documents, you must first define a request document as a document type in the Mobile Document Types window. When you define a document type, you need the following:

  • Previously defined mobile groups. Alternatively, you can create mobile groups as part of defining the document type.

  • Previously defined XML schemas for validating incoming request documents. Alternatively, you can define schemas as part of defining the document type.

    This step is optional.

  • Previously defined codeunits for document handling.

    Note Note

    Document handlers and document types are tightly connected. The name of the document type is used in the codeunit, and the ID and name of the codeunit is used when you define the document type.

Microsoft Dynamics NAV includes a number of predefined document types for Microsoft Dynamics Mobile 2008 - Mobile Sales that you can use or modify.

To define a document type

  1. In the Administration section of the navigation pane, click Application Setup, Mobile, Document Types.

  2. In the Mobile Document Types window, fill in the following fields:

    Field Description

    Request Type

    The name of the document type, such as CreateCustomer.

    Description

    A description of the document type, such as Creates documents based on my document handler.

    Strict Schema Validation

    True to enable strict schema validation; otherwise False. If you leave this field blank and you assign a schema to the document type, the document type will use relaxed schema validation. For more information, see How to: Work with Mobile Document Schemas.

    Process Type

    Direct to process request documents as they enter the document queue; Queue to process request documents at a later time. For more information, see How to: Process Mobile Documents.

    Processing Codeunit

    The object ID for the codeunit that handles the request document. For more information, see Creating Document Handlers in Microsoft Dynamics NAV.

    Processing Codeunit Name

    The name of the codeunit. This field is read-only.

You can now add user groups and, optionally, XML schemas to the document type.

To add user groups to a document type

  1. In the Mobile Document Types window, select the document type that you want to add user groups to, and then click Doc. Type, Groups.

  2. In the Mobile Document Groups window, in the Group Code field, click the AssistButton.

  3. In the Mobile Groups window, select the group that you want to assign permission for this document type to, and then click OK.

    Note Note

    In the Mobile Groups window, you can add previously defined groups, or you can create new groups. For more information, see How to: Set Up Mobile Groups.

  4. Repeat steps 2 and 3 for any other groups that you want to add to the document type.

To add an XML schema to a document type

  1. In the Mobile Document Types window, select the document type that you want to add an XML schema to, and then click Doc. Type, Schemas.

  2. In the Mobile Document Types Schemas window, in the Document Schema Code field, click the AssistButton.

  3. In the Mobile Document Schemas window, select the schema that you want to add to the document type, and then click OK.

    Note Note

    In the Mobile Document Schemas window, you can add previously defined schemas, or you can define new schemas. For more information, see How to: Work with Mobile Document Schemas.

  4. Repeat this procedure for any other document types that you want to add schemas to.

See Also

Tasks

How to: Set Up Mobile Users
How to: Set Up Mobile Groups
How to: Work with Mobile Document Schemas
How to: Process Mobile Documents

Concepts

Mobile Development Tools - Server Components Overview
Working with Mobile Requests
Creating Document Handlers in Microsoft Dynamics NAV


How to: Work with Mobile Document Schemas

How to: Work with Mobile Document Schemas

In Microsoft Dynamics NAV, communication between mobile devices and the server is handled by XML documents. To validate input from mobile devices, you can apply schemas to the document types. The schemas validate incoming XML to ensure that it contains the expected elements, and that each element value complies with the data type for that value. When both the mobile application and the document type adhere to the same schemas, data is more easily exchanged.

You can import document schemas before you define document types, or you can import the schemas while you are defining the document types.

Note Note

Document types do not require schemas in order to function. However, adding a schema to a document type adds a layer of validation and an element of security to the document handling, because only a well-formed XML document that complies with the schema can be processed by the underlying document handler. Alternatively, you must add the XML validation to the document handler.

When you import a document schema, you need the following:

  • An .xsd file that defines a schema with a valid namespace.

To import a document schema

  1. In the Administration section of the navigation pane, click Application Setup, Mobile, Document Schemas.

  2. In the Mobile Document Schemas window, in the Code field, type a code for the schema.

  3. Click Schema, Import to import a previously defined XML schema.

Working with Document Schemas

In the Mobile Document Schemas window, you can view existing schemas, and you can export a schema, modify it, and then import it again. You can also see which document types use a document schema.

To view an existing document schema

  • In the Mobile Document Schemas window, select the document schema that you want to view, and then click Schema, View.

    The schema opens as an .xml file in a Windows Internet Explorer window.

To export an existing document schema

  • In the Mobile Document Schemas window, select the document schema that you want to export, and then click Schema, Export.

    You can now save the schema as an .xsd file. This enables you to share schemas with other databases, or you can modify the schema, for example to accommodate another document type, and then import it again. For information about importing document schemas, see the first procedure in this topic.

Microsoft Dynamics NAV includes schemas for Microsoft Dynamics Mobile 2008 - Mobile Sales and a sample schema for Mobile Development Tools - Server Components.

See Also

Tasks

How to: Set Up a Document Type in Microsoft Dynamics NAV

Concepts

Mobile Development Tools - Server Components Overview
Working with Mobile Requests


Mobile Security Roles

Mobile Security Roles
DropDown image

Microsoft Dynamics NAV provides security roles that you can apply to Windows logins to assign users access to mobile functionality. For more information about security roles in Microsoft Dynamics NAV, see the Installation and System Management manual for the Microsoft Dynamics NAV SQL Server Option. For more information about security in Microsoft Dynamics NAV, see the Application Designer’s Guide.

Predefined Mobile Security Roles

Microsoft Dynamics NAV comes with the following predefined security roles. All roles provide object level security by assigning access to tables.

Role | Description | Assign to
MOB-SERVER-NAS | Provides the user with permission to validate incoming requests and to add requests to the document queue. | The user account under which Application Server for Microsoft Dynamics NAV runs.
MOB-SERVER-SETUP | Provides the user with permission to set up and maintain mobile functionality in Microsoft Dynamics NAV, including setting up mobile users, document types, and document schemas. | Users who set up and maintain mobile functionality on the server.
MOB-SERVER-USER | Provides the user with read permission to access mobile tables. It also gives permissions to modify and delete requests in the document queue. | Users who process and maintain the document queue.
MOB-SALES-CUST-PRICE | Provides the user with permission to update customer prices in Mobile Sales. | Users who run the Mobile Create Customer Price report to add unit price per item per customer for the mobile application.
MOB-SALES-SETUP | Provides the user with permission to set up and maintain Mobile Sales functionality, including defining if Mobile Sales activities must be updated automatically when to-dos are updated. | Users who set up and maintain mobile functionality on the server.
MOB-SALES-SYNC-TODO | Provides the user with permission to modify the Mobile Sales Activity table through the To-do table. | Users who will run the Mobile Sync. To-do/Activity report to synchronize to-dos with Mobile Sales activities

For more information about how to see a list of tables that a role provides access to, see Modifying Permissions for Roles in Microsoft Dynamics NAV online Help.

See Also

Tasks

How to: Set Up Mobile Users
How to: Configure NAV Application Server for Mobile Integration

Concepts

Mobile Development Tools - Server Components Overview


Creating Document Handlers in Microsoft Dynamics NAV
DropDown image

Mobile devices can send various types of request documents to Microsoft Dynamics NAV. For example, the mobile application can have a request document for creating a new customer and another for submitting an order. The request document is an XML file, and you must define a processing codeunit that reads the XML, verifies permissions, and executes the relevant business logic in Microsoft Dynamics NAV. These codeunits are document handlers. Each document handler corresponds to one or more document types. Therefore you must determine which document types your application needs before you create the document handling codeunit.

Depending on your setup, Microsoft Dynamics NAV includes one or both of the following two document handlers: codeunit 8703 Mobile Document Handler and codeunit 8725 Mobile Sales Document Handler.

Document Handlers

A document handling codeunit can define one or more document handlers. The sample document handling codeunit for Mobile Development Tools - Server Components, codeunit 8703 Mobile Document Handler, contains a single document handler, CreateCustomerHandle, and the document handling codeunit for Mobile Sales, codeunit 8725 Mobile Sales Document Handler, contains four document handlers. For more information about Mobile Sales Document Handler, see Mobile Sales Document Handlers.

Requisite Code

A document handling codeunit must contain code that does the following:

  • Ensures that the database remains consistent during document processing. Typically, this is handled by implementing a CONSISTENT(FALSE) statement at the start of the OnRun function and a CONSISTENT(TRUE) statement at the end of the OnRun function.

  • Specifies which document types are handled by which document handlers in the codeunit. Typically, this is handled by a CASE statement in the OnRun function to send each incoming XML document of a certain document type to the corresponding document handling function.

  • Saves results to the mobile document queue and, optionally, sends a response document to the mobile device.

Also, each document handling function, such as CreateCustomerHandle, must do the following:

  • Check the permissions for the mobile user who has submitted the request document. You can use the CheckPermission function from the Mobile Permission Management codeunit to check that the mobile user has the appropriate permissions to each table that the request document accesses.

    The codeunit will run under the user account for Microsoft Dynamics NAV Application Server. In most cases, you want the code to run with more restricted permissions, and with the CheckPermission function, you can restrict access to tables.

  • Read the XML code in the request document. You can use the LoadXMLRequestDoc function from the Mobile Document Queue table to open the XML document. You must add local variables to process the XML document by using the Microsoft XML, v6.0 automation server. For more information, see AUTOMATION in the C/SIDE Reference Guide.

    The XML code lists the tasklets that generated the request document, and almost always, you will want to process each tasklet in a separate function. You can use a CASE statement to send each tasklet section of the request document to a separate function for further processing.

  • Optionally, log the changes. Mobile Sales Document Handler uses the LogInsertion function from codeunit 8701, Mobile Document Manangement, to add to the change log.

Depending on the type of request document, you must include code that creates new records, reads or updates existing records, or marks records for deletion. You can put this code in a separate function, or in the same function that processes the XML document itself. No matter where you put the code, you must know the names of the XML elements in the request document as well as in the Microsoft Dynamics NAV tables.

Sample Document Handling Codeunit

Microsoft Dynamics NAV includes a sample document handler, codeunit 8703 Mobile Document Handler, which can process requests to create new customers. This section describes how the codeunit meets the requirements that are outlined above. The following functions are described:

  • OnRun

  • CreateCustomerHandle

  • CustomerNodeHandle

  • SaveResult

OnRun Function

The following code example contains the OnRun function from Mobile Document Handler.

CopyCode image Copy Code
CONSISTENT(FALSE);

CASE "Document Type" OF
  'CreateCustomer':
    CreateCustomerHandle(Rec);
  ELSE
    ERROR(Text000,"Document Type");
END;

CONSISTENT(TRUE);

In the code, the OnRun function executes on a record in the Mobile Document Queue table. The code uses the CONSISTENT function in C/SIDE to make sure that the codeunit executes as a single transaction. For more information, see CONSISTENT (Record) in the C/SIDE Reference Guide. In the CASE switch, CreateCustomer is the name of a document type that this codeunit can process. If the codeunit supports several document types, you can list the document types in the switch. CreateCustomerHandle is the document handling function that processes the request document.

CreateCustomerHandle Function

The following code example contains sections from the CreateCustomerHandle function from Mobile Document Handler.

First, the function checks permissions for the mobile user who has submitted the request document.

CopyCode image Copy Code
WITH Permission DO
  MobPermissionMgt.CheckPermission(
    MobDocQueue."Mobile User ID","Object Type"::"Table Data",DATABASE::Customer,
    "Read Permission"::" ","Insert Permission"::Yes,"Modify Permission"::" ",
    "Delete Permission"::" ","Execute Permission"::" ");

The code illustrates how this document handling function uses the CheckPermission function from the Mobile Permission Management codeunit to check that the mobile user has the appropriate permissions to each table that the request document accesses. In this case, the mobile user must have permission to insert records in the Customer table because the request document is for creating customers.

Note Note

This permissions check does not replace the Microsoft Dynamics NAV security system. You must have assigned the appropriate security roles to the mobile users.

Next, the function reads the XML of the request document.

CopyCode image Copy Code
MobDocQueue.LoadXMLRequestDoc(XMLRequestDoc);

XMLRootNode := XMLRequestDoc.documentElement;

XMLNodeList := XMLRootNode.childNodes;

FOR i := 1 TO XMLNodeList.length DO BEGIN
  XMLCurrNode := XMLNodeList.item(i - 1);
  MobXMLMgt.GetAttribute(XMLCurrNode,'name',AttributeValue);
  CASE AttributeValue OF
    'CustomerDetailTasklet': XMLCustomerNode := XMLCurrNode.firstChild;
    'CustomerCreditLimitDetailTasklet': XMLCreditlimitNode := XMLCurrNode.firstChild;
    'CustomerContactDetailTasklet': XMLContactNode := XMLCurrNode.firstChild;
    ELSE
      ERROR(Text001,AttributeValue);
  END;
END;

In the code, CustomerDetailTasklet, CustomerCreditLimitDetailTasklet, and CustomerContactDetailTasklet are names of tasklets in the UserRole.xml file for the mobile application. In this case, the application is the Mobile Development Tools sample application. For more information, see the Mobile Development Tools Orchestration Guide.

The CreateCustomerHandle function breaks the XML document into sections that correspond to the tasklets. Each section is then passed on to a separate function that processes the business logic for that tasklet. For example, XMLCustomerNode is the section of the XML document that corresponds to the CustomerDetailTasklet tasklet. Later, you will see how this is processed by the CustomerNodeHandle function.

Next, the function inserts a record in the Customer table, calls the three functions to process each of the three tasklet sections, and then saves the modified records in the Customer and Mobile Document Queue tables.

CopyCode image Copy Code
Customer.INIT;
Customer.INSERT(TRUE);

CustomerNodeHandle(XMLCustomerNode,Customer);
CreditLimitNodeHandle(XMLCreditlimitNode,Customer);
ContactNodeHandle(MobDocQueue,XMLContactNode,Customer);

Customer.MODIFY(TRUE);

RecRef.GETTABLE(Customer);
MobDocMgt.LogInsertion(MobDocQueue,RecRef);

SaveResult(MobDocQueue,Customer);

In the example, the CustomerNodeHandle(XMLCustomerNode,Customer); statement calls the CustomerNodeHandle function and passes the XML section with the customer information. SaveResult is a function that updates the mobile document queue with the result of the processing. This is described in a later section.

CustomerNodeHandle Function

The following code example illustrates a function that processes a tasklet section of the XML document, in this case the CustomerNodeHandle function from Mobile Document Handler. In Mobile Document Handler, the CreateCustomerHandle function passes the section of the request document that contains information about the customer to the CustomerNodeHandle function. This section corresponds to the CustomerDetailTasklet tasklet in the Mobile Development Tools sample application.

CopyCode image Copy Code
MobXMLMgt.FindNode(XMLCustomerNode,'name',XMLCurrNode);
Customer.VALIDATE(Name,XMLCurrNode.text);

MobXMLMgt.FindNode(XMLCustomerNode,'email',XMLCurrNode);
Customer.VALIDATE("E-Mail",XMLCurrNode.text);

MobXMLMgt.FindNode(XMLCustomerNode,'type',XMLCurrNode);
Customer.VALIDATE("Customer Disc. Group",XMLCurrNode.text);

In the code, MobXMLMgt is a global variable for codeunit 8704 Mobile XML DOM Management. The CustomerNodeHandle function uses the FindNode function to extract information about the customer name, e-mail address, and customer discount group. The function then calls VALIDATE on the new record in the Customer table to set the appropriate field values for the new customer and validate the values. For more information, see VALIDATE (Record) in the C/SIDE Reference Guide.

Note Note

The code in the CustomerNodeHandle function specifies both the elements in the incoming XML document and the corresponding fields in the Customer table. You must know the structure of the XML document in order to process it. You can see the structure in the schema for the mobile application. For more information, see the Mobile Development Tools Orchestration Guide.

SaveResult Function

The following code example illustrates a function that creates a response to the mobile user and updates the mobile document queue with the new status for the request document. In Mobile Document Handler, the SaveResult function is called from the CreateCustomerHandle function when the request document has been processed.

CopyCode image Copy Code
WITH MobDocQueue DO BEGIN
  MobDocMgt.CreateXMLResponseDocCompleted(XMLResultDoc,"Message ID",STRSUBSTNO(Text002,Customer.TABLECAPTION,Customer."No."));

  XMLRootNode := XMLResultDoc.documentElement;
  MobXMLMgt.AddElement(XMLRootNode,'responseData','',XMLRootNode.namespaceURI,XMLCreatedNode);
  MobXMLMgt.AddElement(XMLCreatedNode,'newCustomerAccount',Customer."No.",XMLRootNode.namespaceURI,XMLCreatedNode);

  SaveXMLResultDoc(XMLResultDoc);
  Status := Status::Completed;
  MODIFY;
END;

The code uses functions on codeunits 8701 Mobile Document Management and 8704 Mobile XML DOM Management to create an XML document that can be sent as a response to the mobile user, and then it updates the record in the Mobile Document Queue table.

See Also

Tasks

How to: Set Up a Document Type in Microsoft Dynamics NAV

Concepts

Mobile Development Tools - Server Components Overview
Mobile Sales Document Handlers


Mobile Sales Document Handlers

Mobile Sales Document Handlers
DropDown image

Microsoft Dynamics Mobile 2008 - Mobile Sales provides predefined document handlers for use in Microsoft Dynamics NAV to that handle incoming request documents. The document handlers are defined as global functions in a codeunit. You can customize the predefined document handlers or create new document handlers. For more information, see Creating Document Handlers in Microsoft Dynamics NAV.

Predefined Document Handles

Mobile Sales includes 4 predefined document handlers that are defined in codeunit 8725 Mobile Sales Document Handler. Each document handler consists of two functions to read the incoming XML document and to execute business logic in Microsoft Dynamics NAV. The following table describes the predefined document handlers:

Document handler Description

CreateActivityHandle

Handles requests to create new activities.

CreateActivityHandle reads the incoming XML document, verifies permissions, saves the document as a new record in the mobile document queue, and then calls CreateActivityNodeHandle with the request document from the mobile document queue, the XML content, and a variable for the To-do table.

CreateActivityNodeHandle inserts a new record in the To-do table with the data from the request document, and it creates a new record in the Attendee table.

ModifyActivityHandle

Handles requests to update existing activities.

ModifyActivityHandle reads the incoming XML document, verifies permissions, saves the document as a new record in the mobile document queue, and then calls ModifyActivityNodeHandle with the request document from the mobile document queue, the XML content, and a variable for the To-do table.

ModifyActivityNodeHandle gets the record from the To-do table that must be modified, and then validates the field values in the request document against the values in the existing record. If the function must update the existing to-do, the record is flagged as modified.

DeleteActivityHandle

Handles requests to delete activities.

DeleteActivityHandle reads the incoming XML document, verifies permissions, saves the document as a new record in the mobile document queue, and then calls DeleteActivityNodeHandle with the request document from the mobile document queue, the XML content, and a variable for the To-do table.

DeleteActivityNodeHandle gets the record from the To-do table that must be deleted, and then sets the Canceled field to True.

CreateOrderHandle

Handles requests to create new sales orders, including signature and sales order lines.

CreateOrderHandle reads the incoming XML document, verifies permissions, saves the document as a new record in the mobile document queue, and then calls CreateOrderNodeHandle with the request document from the mobile document queue, the XML content, and a variable for the SalesHeader table.

CreateOrderNodeHandle inserts a new record in the SalesHeader table with data from the request document, including customer no., dates, currency, and the salesperson code, which is derived from the Mobile User table. If the customer signed the sales order, the signature is saved to the Signature field as a BLOB. CreateOrderNodeHandle then creates a record in the SalesLine table for each order line in the request document.

Before a document handler can process incoming request documents, you must define a document type. For more information, see How to: Set Up a Document Type in Microsoft Dynamics NAV. Microsoft Dynamics NAV includes a number of predefined document types for Microsoft Dynamics Mobile 2008 - Mobile Sales that you can use or modify.

See Also

Tasks

How to: Set Up a Document Type in Microsoft Dynamics NAV

Concepts

Creating Document Handlers in Microsoft Dynamics NAV
Mobile Sales Overview
Extending Sales and Marketing with Mobile Sales

Other Resources

Setting Up Mobile Functionality


How to: Set Up Mobile Sales in Microsoft Dynamics NAV

Microsoft Dynamics Mobile 2008 - Mobile Sales integrates with Microsoft Dynamics NAV by extending sales and marketing functionality onto mobile devices. One area of functionality is to-dos. To-dos and activities in Microsoft Dynamics NAV display as activities in Mobile Sales. As part of setting up mobile functionality in Microsoft Dynamics NAV, you must specify when to synchronize to-dos and activities between the mobile devices and the server.

You can set Microsoft Dynamics NAV to automatically send all to-dos to the Mobile Sales Activities table. Mobile Sales can then synchronize the table with the mobile devices. The synchronization of Microsoft Dynamics NAV to-dos with Mobile Sales activities occurs in one of the following ways:

  • In the Mobile Sales Setup window, you set that Microsoft Dynamics NAV must send all new to-dos to the Mobile Sales Activity table.

  • You schedule existing to-dos to synchronize to the Mobile Sales Activity table by setting the job queue to run the Mobile Sync. To-do/Activity batch job. This sends all existing to-dos to the Mobile Sales Activities table.

For more information, see Extending Sales and Marketing with Mobile Sales.

Note Note

To allow users to use Mobile Sales with Microsoft Dynamics NAV from a mobile device, you must assign users the appropriate security roles. For more information, see Mobile Security Roles.

To set up Mobile Sales in Microsoft Dynamics NAV

  1. In the Administration section of the navigation pane, click Application Setup, Mobile, Mobile Sales, Mobile Sales Setup.

  2. To enable synchronization of new to-dos to Mobile Sales, select the Auto. Activity Update field.

    When you create new to-dos, they are automatically added to the Mobile Sales Activity table that provides activity data for the mobile devices. Optionally, run the Mobile Sync. To-do/Activity batch job once to populate the table with existing to-dos so that mobile users have access to activities on their mobile devices.

    Note Note

    If you clear the Auto. Activity Update field in the Mobile Sales Setup window, and you want to use activities in Mobile Sales, you should use the job queue to schedule existing to-dos to synchronize to the Mobile Sales Activity table.

Alternatively, you schedule existing to-dos to synchronize to the Mobile Sales Activity table.

To schedule existing to-dos to synchronize to the Mobile Sales Activity table

  1. In the Administration section of the navigation pane, click Application Setup, Job Queue, Job Queue Entries.

  2. In the Job Queue Entry Card window, press F3 to create a new job.

  3. On the General tab, fill in the following fields:

    Field Value

    Object Type to Run

    Report

    Object ID to Run

    8726

    Parameter String

    Any parameters that you want to define to reduce the scope of the batch job. For example a range of to-dos or a starting date.

    Maximum No. of Attempts to Run

    The number of attempts to allow. For example 2.

    Expiration Date/Time

    The last day on which the job will run.

    Expiration Date/Time

    The first day on which the job will run.

    Priority

    The priority of this job compared to other jobs in the job queue.

  4. On the Recurrence tab, specify the recurrence of the job.

The job will now run according to the schedule you have defined. For more information, see Job Queue Entry Card Window in Microsoft Dynamics NAV online Help.

Depending on the filters you apply, this populates the Mobile Sales Activity table with all existing to-dos, and Mobile Sales can synchronize with mobile devices.

See Also

Concepts

Extending Sales and Marketing with Mobile Sales
Mobile Security Roles
Mobile Sales Overview

Other Resources

Setting Up Mobile Functionality


How to: Enable Signatures on Sales Orders

When a salesperson is creating a sales order using Mobile Sales, the customer can sign the sales order on the mobile device to confirm the order. The signature is saved to a separate table when the mobile device synchronizes with the server. By default, the signature is not available from the Sales Order window in Microsoft Dynamics NAV, because prices may have changed between the customer signing the order and the mobile device synchronizing with the server. However, if your setup guarantees that the prices on the mobile device are correct, you can enable signatures on sales orders.

To enable signatures on sales orders

  1. In Microsoft Dynamics NAV, in the Object Designer, select form 42 Sales Order, and then open the form in the form designer.

  2. In the Form Designer window, right-click the Order menu button, and then click Menu Items.

  3. In the Menu Designer window, in the row for the Signature menu item, select the Visible field, and then close the window.

  4. Close the Form Designer window, save changes and compile the form.

  5. Run the Sales Order form.

  6. In the Sales Order window, click Order, and then click Signature.

    The Mobile Order Signature window opens. If the currently selected sales order has a customer signature, this displays in the window.

See Also

Concepts

Extending Sales and Marketing with Mobile Sales


Working with Mobile Requests

Working with Mobile Requests
DropDown image

Microsoft Dynamics Mobile 2008 - Mobile Development Tools - Server Components manage the interaction between mobile devices and Microsoft Dynamics NAV. Mobile devices send data and requests back to the server as XML documents, called request documents. Inside Microsoft Dynamics NAV, application objects called document handlers and document types complete the integration. This section shows you how to work with request documents in Microsoft Dynamics NAV.

Note Note

To use mobile functionality during run time, you must install and configure Microsoft Dynamics Mobile Development Tools.

Monitoring the Request Document Queue

When a user submits a request from a mobile device, the mobile document service adds this request to the request document queue in Microsoft Dynamics NAV. The mobile application on the device can request information, or it can request that data be created, updated, or deleted.

All request documents are sent to the Mobile Document Queue table before being processed. The request documents can be processed in two ways, as described in the following table:

Processing method | Description
Direct processing | A request document is sent to the document queue and is processed immediately, returning a result to the mobile device.
Queued processing | A request document is sent to the queue and is not processed until initiated by the user or by the document queue processor.

All request documents in the document queue can be monitored using the Document Queue List window, which is a log that provides a status of the request documents. When request documents are processed, they remain in the document queue with the status Completed until they are manually deleted. For more information, see How to: Process Mobile Documents.

Security

When a user submits a request document to Microsoft Dynamics NAV, the mobile document dispatcher validates their access to the specific document type. If the mobile user is not a member of a mobile group that is assigned to the specific document type, the request is rejected. Queued request documents are revalidated when they are processed. A document handler can also validate the mobile user's access to the tables before processing a request document.

If the required user right is unassigned between when the document is submitted and processed, the document queue processor does not process the document, and an error is returned. The administrator must then assign the required user right or delete the request document.

Mobile Document Queue

In the Document Queue List window, you can modify a request document that has not yet processed successfully. This is useful if an error occurs when you are trying to process it the first time. You can also reset status, delete a request document, and manually import and export request documents as XML.

In the Document Queue List window, you can see the following information about a request document:

Field Description

Message ID

Contains the definition of the item.

Device ID

Contains the unique identifier for the mobile device that submitted the request document.

Mobile User ID

Specifies the user name of the individual who submitted the request document. For more information, see How to: Set Up Mobile Users.

Document Type

Specifies the document type used to process the request document. For more information, see How to: Set Up a Document Type in Microsoft Dynamics NAV.

Process Type

Specifies the type of processing used on the request document:

  • Direct

  • Queued

Status

Displays the status of request documents:

New

The request document has not been processed yet.

Processing

The request document is currently being processed.

Completed

Request document has been processed successfully.

Error

An error occurred during the processing of the request document.

Created Date/Time

Specifies the date and time when the request document was saved to the document queue.

Answer Date/Time

Specifies the date and time when the answer was saved to the queue.

Result Date/Time

Specifies the date and time when the document was processed.

Request XML

Displays the XML source of the request document.

Answer XML

Displays the message that is returned to the mobile device when the request document is recorded in the queue. If the Process Type field for the request document is set to Direct, then the message that follows is identical to the one in the Result XML field.

Result XML

Displays the message returned when the request document is processed. Any errors that occur display in this field.

See Also

Tasks

How to: Process Mobile Documents
How to: Modify a Mobile Document Before Processing
How to: Set Up Mobile Users
How to: Set Up a Document Type in Microsoft Dynamics NAV


How to: Process Mobile Documents

How to: Process Mobile Documents

When a mobile device sends a request to the Microsoft Dynamics NAV application, the request is stored in the Mobile Document Queue table. Depending on the document type, the request is processed immediately, or you must process the request at a later time. For more information, see Working with Mobile Requests.

When you monitor the request document queue, you can:

  • View any errors that occurred while processing request documents.

  • Modify request documents that have not processed successfully.

  • Clear the request documents from the document queue table, depending on the filters that you specify.

You can process any request document in the document queue where the document status is New or Error. For example, if a request document fails to process because of an error, you can modify the request and process it again.

To view the Mobile Document Queue List window in Microsoft Dynamics NAV

  1. In Microsoft Dynamics NAV, in the Administration section of the navigation pane, click Application Setup, Mobile, Document Queue List.

  2. In the Mobile Document Queue List window, select the Show All field to display all of the request documents, or apply one or more filters to display the relevant request documents:

    1. To filter by user ID, select a user ID in the Mobile User Filter field.

    2. To filter by document type, select a document type in the Document Type Filter field.

    3. To display request documents by status, select one or more of the New, Processing, Completed, or Error fields.

Note Note

For a description of the fields in the Mobile Document Queue List window, see Working with Mobile Requests.

To process a request document from the Mobile Document Queue List window

  • In the Mobile Document Queue List window, select the request document and click Functions, Process Documents.

Note Note

To process multiple documents, select the documents that you want to process while you press CTRL+SHIFT. Alternatively, apply a filter as described in the previous section and select all displayed documents. Only the selected documents are processed.

Monitoring the Document Queue

The Mobile Document Queue List window enables you to modify a request document that has not yet been processed. This is useful if an error occurs when trying to process it the first time. You can also reset the document status, delete a request document, and manually import and export request documents as XML.

To reset the status for a request document

  1. In the Mobile Document Queue List window, select the request document that you want to reset the status for, and click Functions, Reset Documents.

  2. In the dialog box that appears, click Yes to reset the status, or click No. The document status is set to New.

This is useful if the connection to the database was lost while a request document was being processed. The document status remains as Processing, but the processing has actually stopped.

To delete a request document

  • In the Mobile Document Queue List window, select the request document that you want to delete, and click Functions, Delete Documents. A dialog box appears where you can confirm that you want to delete the request document.

    Note Note

    You cannot delete documents where the status is Processing.

    Caution note Caution

    If you delete a document where the status is New or Error, data that has not been saved to the database is lost.

To export a request document XML file

  1. In the Mobile Document Queue List window, select the relevant request document, and click Functions, Export Request XML.

  2. In the window that appears, browse to the location where you want to save the XML file, and then click Open.

To import a request document XML file

  1. In the Mobile Document Queue List window, select the relevant request document, and click Functions, Import Request XML.

  2. In the window that appears, browse to the location where the XML file is placed, select the file, and then click Open.

See Also

Tasks

How to: Set Up a Document Type in Microsoft Dynamics NAV

Concepts

Working with Mobile Requests


How to: Modify a Mobile Document Before Processing

How to: Modify a Mobile Document Before Processing

The Mobile Document Queue List window enables you to modify a request document that is either new or has not processed successfully, and the status displays as Error. This is useful if an error occurs when trying to process it the first time.

Note Note

For a description of the fields in the Mobile Document Queue List window, see Working with Mobile Requests.

To modify a request document before processing

  1. In Microsoft Dynamics NAV, in the Administration section of the navigation pane, click Application Setup, Mobile, Document Queue List.

  2. In the Mobile Document Queue List window, select the request document that you want to modify, for example, by applying the appropriate filters. For more information, see How to: Process Mobile Documents.

  3. Click Functions, Export Request XML.

  4. In the window that appears, browse to the location where you want to save the XML file, and then click Open.

  5. Open the exported XML file and make the appropriate changes. For example, add or remove elements, or modify attributes.

  6. To import the modified request document, in the Mobile Document Queue List window, click Functions, Import Request XML.

    Note Note

    Make sure that you import the same document that was exported.

  7. In the window that appears, browse to the location where the XML file is placed, select the file, and then click Open.

  8. To process the modified request document, in the Mobile Document Queue List window, select the relevant request document, and then click Functions, Process Documents.

See Also

Tasks

How to: Process Mobile Documents

Concepts

Working with Mobile Requests


Extending Sales and Marketing with Mobile Sales
DropDown image

Microsoft Dynamics NAV includes functionality from Microsoft Dynamics Mobile 2008 - Mobile Sales. Mobile Sales extends areas in Sales and Marketing so a salesperson can update the Microsoft Dynamics NAV application from a mobile device while visiting a customer.

Available Mobile Sales Functionality

Mobile Sales adds the ability to create and modify sales orders on a mobile device to existing Microsoft Dynamics NAV applications. Mobile Sales also extends the application by adding new functionality in the sales and marketing area.

Activities and To-dos

To-dos in Microsoft Dynamics NAV are shown as activities in Mobile Sales. In Microsoft Dynamics NAV, a to-do often contains several activities, but in Mobile Sales an activity exists independently of other activities, and a to-do displays as an activity. In order for Mobile Sales to use a to-do from Microsoft Dynamics NAV, the to-do must meet the following requirements:

  • The to-do must be of type Meeting.

  • The to-do must be assigned to a salesperson.

  • The to-do must be for a single contact of type Company.

  • The to-do cannot be an all day event.

  • The to-do cannot be canceled.

You can set Microsoft Dynamics NAV to automatically send all to-dos that meet the requirements to the Mobile Sales Activities table. Mobile Sales can then synchronize the table with the mobile devices. To set Microsoft Dynamics NAV to send to-dos to Mobile Sales Activity table, you must specify this in the Mobile Sales Setup window. This will send all future to-dos to the table.

To send all existing to-dos to the Mobile Sales Activity table, you can run the Mobile Sync. To-do/Activity batch job. You can also run this report if the To-do table and the Mobile Sales Activity table are not currently synchronized. Alternatively, you can create a job queue entry to run the batch job at regular intervals.

Note Note

You must chose to either schedule the Mobile Sync. To-do/Activity batch job to run in the job queue, or to set Microsoft Dynamics NAV to send new to-dos automatically as part of the Mobile Sales setup. However, if you set Microsoft Dynamics NAV to send new to-dos automatically, you can run the batch job once to populate the Mobile Sales Activity table.

For more information, see How to: Set Up Mobile Sales in Microsoft Dynamics NAV. For more information about to-dos, see Creating To-dos in Microsoft Dynamics NAV Help.

Campaigns

Mobile Sales extends campaigns with the concepts of selling-in periods and visible dates. If your company has set up campaigns, you can inform salespeople when a campaign can be promoted by specifying the selling-in period for the campaign. For more information, see How to: Add a Selling-in Period to a Campaign. For more information about campaigns, see Campaign Table in Microsoft Dynamics NAV Help.

Updating Customer Item Prices for Mobile Sales

Microsoft Dynamics NAV calculates prices on sales orders by including discounts and campaigns. On a mobile device, these complex calculations consume too much memory, so the prices that Mobile Sales displays on the mobile device are pushed to the device from the server. In Microsoft Dynamics NAV, Mobile Sales requires that you run the Mobile Create Customer Price batch job to calculate the price per item per customer and populate this data to a table. You then set the Mobile Sales staging database to synchronize the data to the mobile device where Mobile Sales shows the calculated price when the user is creating a sales order for a customer.

You can set up a job queue entry that runs the Mobile Create Customer Price batch job according to a schedule that you define. For more information, see How to: Update Customer Item Prices for Mobile Sales, and also see Job Queue Entry Card Window in Microsoft Dynamics NAV Help.

Customer Signature on Sales Orders

When a salesperson is creating a sales order using Mobile Sales, the customer can sign the sales order on the mobile device to confirm the order. The signature is saved to a separate table when the mobile device synchronizes with the server. By default, the signature is not available from the Sales Order window in Microsoft Dynamics NAV, since prices may have changed between the customer signing the order and the mobile device synchronizing with the server. However, if your setup ensures that the prices on the mobile device is correct, you can enable signatures on sales orders. For more information, see How to: Enable Signatures on Sales Orders.

Document Handlers, Document Types, and Document Schemas

Mobile devices send data and requests back to the server as XML documents, called request documents. Inside Microsoft Dynamics NAV, application objects called document handlers and document types complete the integration. Microsoft Dynamics NAV includes document handlers in a processing codeunit, and four document types that are supported by XML schemas.

A document type manages user access and validation for incoming request documents. The Mobile Sales document types in Microsoft Dynamics NAV handle requests to create sales orders, and to create, modify, and delete to-dos and activities.

For more information, see Mobile Sales Document Handlers and How to: Set Up a Document Type in Microsoft Dynamics NAV.

See Also

Tasks

How to: Set Up Mobile Sales in Microsoft Dynamics NAV
How to: Add a Selling-in Period to a Campaign
How to: Update Customer Item Prices for Mobile Sales
How to: Enable Signatures on Sales Orders

Concepts

Mobile Sales Overview
Mobile Security Roles

Other Resources

Setting Up Mobile Functionality


How to: Add a Selling-in Period to a Campaign

Microsoft Dynamics Mobile 2008 - Mobile Sales extends campaigns with the concept of selling-in periods. You can inform salespeople when a campaign is active by specifying the selling-in period for the campaign. For more information, see Campaign Table in Microsoft Dynamics NAV Help.

To add a selling-in period to a campaign

  1. In the Campaign List window, select the campaign that you want to add a selling-in period to, and then click Campaign, Card.

  2. In the Campaign Card window, on the Mobile tab, fill in the following fields:

    Field Description

    Visible Date

    The date that the campaign is available to mobile devices. Mobile users cannot see the campaign on their mobile devices until this date. When the campaign is visible, salespeople can promote the campaign when talking to customers.

    Selling-in Start Date

    The start date when the campaign is active. Mobile users can see the campaign and use it when they visit customers and contacts.

    Selling-in End Date

    The end date when the campaign is no longer active. Mobile users can still see the campaign, but they are not able to use it.

The campaign is sent to mobile devices on the date that you specify in the Visible Date field, and salespeople can start promoting the campaign in their work. Mobile users can use the campaign prices in the selling-in period that you specify in the Selling-in Start Date and Selling-in End Date fields. If you later want to change the selling-in period, change the values of the fields on the Mobile tab.

See Also

Concepts

Extending Sales and Marketing with Mobile Sales
Mobile Sales Overview

Other Resources

Setting Up Mobile Functionality


How to: Update Customer Item Prices for Mobile Sales

Microsoft Dynamics NAV calculates prices on sales orders by including discounts and campaigns. On a mobile device, these complex calculations consume too much memory, so that the prices that Mobile Sales displays on the mobile device are pushed to the device from the server. In Microsoft Dynamics NAV, Mobile Sales requires that you run the Mobile Create Customer Price batch job to calculate the price per item per customer and populate this data to a table. You then set the Mobile Sales staging database to synchronize the data to the mobile device where Mobile Sales shows the calculated price, when the user is creating a sales order for a customer.

Note Note

To synchronize prices to mobile devices, you must install and configure the Mobile Sales database components. For more information, see the Microsoft Dynamics Mobile 2008 - Mobile Development Tools Installation and Integration Guide.

To update customer item prices

  1. In the Administration section of the navigation pane, click Application Setup, Mobile, Mobile Sales, Create Customer Price.

  2. To update prices for a specific customer, in the Mobile Create Customer Price window, on the Customer tab, in the Filter field, click the AssistButton, and select a customer. To update prices for all customers, leave this tab blank.

  3. To update prices for a specific item, in the Mobile Create Customer Price window, on the Item tab, in the Filter field, click the AssistButton, and select an item. To update prices for all items, leave this tab blank.

  4. Click OK to update the prices.

Calculating Customer Item Prices

The Mobile Create Customer Price batch job calculates a price per item per customer at the time of execution. The calculation includes the following information:

  • Sales prices as defined for a specified customer, all customers, a specified customer price group, or a campaign.

  • Line discounts as defined for a specified customer, all customers, a specified customer price group, or a campaign.

If two prices are defined for the same customer on the same item, the batch job applies the lowest price. The Mobile Create Customer Price batch job does not apply the following information:

  • Quantity discounts on quantities that are larger than 1.

  • Prices and line discounts where the starting date is later than the time of running the batch job.

  • Expired prices and line discounts.

The Mobile Create Customer Price batch job creates records in the Mobile Customer Price table, which contains one record per item per customer. For example, if the Microsoft Dynamics NAV database contains 1000 customers and 100 items, the batch job creates 100,000 records.

In the request form for the Mobile Create Customer Price batch job, you can specify if the batch job must run for a specific customer or a specific item. You can also set up a job queue entry for the batch job so that it will run at fixed intervals.

To schedule Mobile Create Customer Price batch job in the job queue

  1. In the Administration section of the navigation pane, click Application Setup, Job Queue, Job Queue Entries.

  2. In the Job Queue Entry Card window, press F3 to create a new job.

  3. On the General tab, fill in the following fields:

    Field Value

    Object Type to Run

    Report

    Object ID to Run

    8725

    Parameter String

    Any parameters that you want to define to reduce the scope of the batch job. For example, a customer or an item.

    Maximum No. of Attempts to Run

    The number of attempts to allow for. For example, two.

    Expiration Date/Time

    The last day on which the job will run.

    Earliest Date/Time

    The first day on which the job will run.

    Priority

    The priority of this job compares to other jobs in the job queue.

  4. On the Recurrence tab, specify the recurrence of the job.

The job will now run according to the schedule that you have defined. For more information, see Job Queue Entry Card Window in Microsoft Dynamics NAV online Help.

See Also

Concepts

Mobile Sales Overview
Extending Sales and Marketing with Mobile Sales

Other Resources

Setting Up Mobile Functionality