Server and Database Administration Guide For Microsoft Dynamics AX
Server and Database Administration Guide For Microsoft Dynamics AX
Server and Database Administration Guide For Microsoft Dynamics AX
Microsoft Dynamics is a line of integrated, adaptable business management solutions that enables you and your people to make business decisions with greater confidence. Microsoft Dynamics works like and with familiar Microsoft software, automating and streamlining financial, customer relationship and supply chain processes in a way that helps you drive business success. U.S. and Canada Toll Free 1-888-477-7989 Worldwide +1-701-281-6500 www.microsoft.com/dynamics This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT. Information in this document, including URL and other Internet Web site references, is subject to change without notice. The entire risk of the use or the results from the use of this document remains with the user. Unless otherwise noted, the companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted in examples herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. 2008 Microsoft Corporation. All rights reserved. Microsoft, Active Directory, BizTalk, Excel, IntelliSense, Internet Explorer, MSDN, SharePoint, Visual Studio, Windows, Windows Server, Windows Vista, X++, and the Microsoft Dynamics Logo are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners.
Table of Contents
Getting started with server and database administration ................................................................ 7 Managing the Application Object Server (AOS) .............................................................................. 8 Designate a batch server ............................................................................................................. 9 Start or stop the Application Object Server Windows service .................................................... 10 Manage client connections for an AOS instance ....................................................................... 10 Managing configurations (Server) .............................................................................................. 11 Configuration security (Server) ............................................................................................... 12 Create a new configuration (Server) ....................................................................................... 12 Save or export a configuration (Server) .................................................................................. 13 Load a configuration (Server) ................................................................................................. 14 Connect an Application Object Server instance to a different application ................................. 15 Connect an Application Object Server instance to a different bin directory ............................... 15 Run commands at startup (Server) ............................................................................................ 16 Change the TCP/IP port an Application Object Server instance runs on .................................. 16 Enable printing from a computer running Application Object Server ......................................... 17 Allow debugging ......................................................................................................................... 18 Encrypt data ............................................................................................................................... 19 Compress data between clients and an Application Object Server ........................................... 19 Connect an Application Object Server instance to a different database.................................... 20 Tune database settings .............................................................................................................. 21 Using the command line to manage the AOS ............................................................................ 24 General options....................................................................................................................... 24 Application Object Server options........................................................................................... 25 Database connection options ................................................................................................. 28 Database tuning options ......................................................................................................... 29 Tracing options ....................................................................................................................... 31 Unfamiliar configuration options ............................................................................................. 33 Troubleshoot problems operating the Application Object Server .............................................. 35 Managing the Microsoft Dynamics AX Windows client ................................................................. 37 Managing configurations (Client) ............................................................................................... 38 Configuration security (Client and Business Connector) ........................................................ 38 Manage a client configuration ................................................................................................. 39 Managing startup settings (Client) ............................................................................................. 42 Change the log location .......................................................................................................... 43 Set company to open on startup ............................................................................................. 43 Run commands at startup (Client) .......................................................................................... 43 Display message at startup .................................................................................................... 44
Connect a client to a different Application Object Server instance ......................................... 44 Enable printing from a computer running Application Object Server ...................................... 45 Manage Help files and updates .............................................................................................. 46 Troubleshoot problems with Microsoft Dynamics AX clients .................................................. 46 Managing instances of Business Connector ................................................................................. 48 About the .NET Business Connector ......................................................................................... 49 Set the Business Connector proxy user ..................................................................................... 49 Configuration security (Client and Business Connector) ........................................................... 51 Manage a configuration for Business Connector ....................................................................... 52 Importing and exporting data ......................................................................................................... 55 Securing data during export and import ..................................................................................... 55 Import and export definition groups............................................................................................ 55 Create definition groups for import and export ....................................................................... 56 Configure tables for definition groups ..................................................................................... 57 Exporting data ............................................................................................................................ 60 Export default data .................................................................................................................. 60 Export data to Microsoft Office Excel ...................................................................................... 61 Export standard data .............................................................................................................. 62 Importing data ............................................................................................................................ 63 Import default data .................................................................................................................. 63 Import custom data and data from other systems .................................................................. 64 Create a template in Microsoft Office Excel ........................................................................... 65 Enter data in Microsoft Office Excel........................................................................................ 66 Import data from Microsoft Office Excel ................................................................................. 67 Import users from Active Directory ......................................................................................... 70 Import data on startup ............................................................................................................. 71 Migrating data............................................................................................................................. 73 Plan data migration ................................................................................................................. 73 Migrate customer, vendor, and item data by using the Excel Template Wizard .................... 74 Migrate historical transaction data .......................................................................................... 76 Migrate open transactions ...................................................................................................... 77 Configuring and managing AIF ...................................................................................................... 78 Exchanging documents electronically using AIF ........................................................................ 79 What's new in AIF ................................................................................................................... 81 Planning for AIF integration .................................................................................................... 84 Using AIF to integrate with external systems ......................................................................... 86 Security considerations for AIF ............................................................................................... 89 Security considerations for AIF Web services ........................................................................ 93 Documents included with Microsoft Dynamics AX ................................................................. 95 Troubleshoot AIF .................................................................................................................... 95 Implementing common trading processes ................................................................................. 99 Implement procure-to-pay: select supplier ........................................................................... 102 Implement orders-to-cash: process RFQ and quote ............................................................ 105 Server and Database Administration Guide 4
Adapter-based exchanges ....................................................................................................... 107 AIF performance ................................................................................................................... 107 Configuring document exchanges with adapters .................................................................. 110 Configure the file system for AIF .......................................................................................... 112 Configure Message Queuing for AIF .................................................................................... 114 Configure BizTalk for AIF ...................................................................................................... 117 Configure global settings for document exchange ............................................................... 121 Create and configure local endpoints ................................................................................... 124 Creating and configuring actions .......................................................................................... 124 Configure an adapter ............................................................................................................ 127 Creating and configuring channels ....................................................................................... 128 Creating and configuring endpoints ...................................................................................... 131 Configure endpoint action policies ........................................................................................ 142 Configure endpoint action data policies ................................................................................ 144 Creating and configuring a pipeline ...................................................................................... 147 About value mapping ............................................................................................................ 151 Configure document parameters .......................................................................................... 157 Limit outbound documents .................................................................................................... 158 Web services-based exchanges .............................................................................................. 159 Configuring document exchanges with Web services .......................................................... 159 Configure Web sites for document exchange ....................................................................... 162 Configure global settings for document exchange ............................................................... 163 Configure services ................................................................................................................ 165 Grant permissions to a service ............................................................................................. 168 Create and configure local endpoints ................................................................................... 169 Creating and configuring actions .......................................................................................... 169 Creating and configuring endpoints ...................................................................................... 172 Configure endpoint action policies ........................................................................................ 182 Configure endpoint action data policies ................................................................................ 185 Creating and configuring a pipeline ...................................................................................... 187 About value mapping ............................................................................................................ 191 Configure document parameters .......................................................................................... 197 Limit outbound documents .................................................................................................... 198 Managing document exchanges .............................................................................................. 199 Start and stop the asynchronous AIF services ..................................................................... 200 View document history .......................................................................................................... 203 Edit and resubmit messages in the queues .......................................................................... 205 Viewing the document log ..................................................................................................... 206 Viewing the exceptions log ................................................................................................... 207 Maintenance and data recovery .................................................................................................. 208 Backups and data recovery...................................................................................................... 209 Plan database backups ........................................................................................................ 209 Plan application file backups ................................................................................................ 210 Plan for disaster recovery ..................................................................................................... 210 Server and Database Administration Guide 5
System maintenance tasks ...................................................................................................... 212 Prepare Microsoft Dynamics AX for maintenance ................................................................ 212 Clean up user logs ................................................................................................................ 212 Optimizing performance .............................................................................................................. 213 Manage load balancing ............................................................................................................ 214 Create a load balancing cluster ............................................................................................ 214 Remove an AOS from load balancing .................................................................................. 216 Set up Performance Monitor counters ..................................................................................... 217 Add counters ......................................................................................................................... 219 Set up an alert....................................................................................................................... 219 Tracing ..................................................................................................................................... 220 Set tracing options ................................................................................................................ 220 Troubleshooting tracing ........................................................................................................ 224 Reading trace files ................................................................................................................ 224 Setting processor affinity .......................................................................................................... 225 Tune database settings ............................................................................................................ 225 Change the concurrency mode ............................................................................................. 225 Tune connections.................................................................................................................. 226 Tune queries ......................................................................................................................... 226 Manage database logs ............................................................................................................. 228 Modifying or uninstalling Microsoft Dynamics AX ........................................................................ 229 Add or remove individual Microsoft Dynamics AX components .............................................. 230 Add individual Microsoft Dynamics AX components ............................................................ 230 Remove individual Microsoft Dynamics AX components ..................................................... 231 Uninstall Microsoft Dynamics AX ............................................................................................. 232 Uninstall components by using Add or Remove Programs .................................................. 232 Remove remaining components manually ........................................................................... 234
Microsoft Dynamics AX
Managing the Application Object Server (AOS) Managing the Microsoft Dynamics AX Windows client Managing instances of Business Connector Importing and exporting data Configuring and managing AIF
Managing Business Connector Importing and exporting data Using the Application Integration Framework (AIF) Maintaining Microsoft Dynamics AX and planning for data recovery Optimizing performance Uninstalling Microsoft Dynamics AX components
Microsoft Dynamics AX
Microsoft Dynamics AX
Microsoft Dynamics AX
10
Microsoft Dynamics AX
This topic describes how to manage security for AOS configurations. This topic describes how to create a new configuration. This topic describes how to save or export a server configuration. This topic describes how to load a server configuration from a file.
See Also
Using the command line to manage the AOS
11
Microsoft Dynamics AX
You cannot modify the original configuration of a system. To change a configuration, you must create a new one and modify it. 1. Open the Server Configuration utility (Start > Administrative Tools > Microsoft Dynamics AX Server Configuration). 2. In the Application Object Server instance box, select the AOS instance to modify. 3. Click Manage, and then click Create configuration: 4. In the Create configuration dialog box, in the Name box, type a name. 5. Decide whether you want to copy settings from the active configuration or the original (default) configuration, and then click OK.
12
Microsoft Dynamics AX
13
Microsoft Dynamics AX
14
Microsoft Dynamics AX
1. Open the Server Configuration utility (Start > Administrative Tools > Microsoft Dynamics AX Server Configuration). 2. Verify that the currently selected AOS instance and configuration are the ones you want to modify. 3. On the Application Object Server tab, in the Application file location box, type the path to the application you would like to connect to, and then click OK.
15
Microsoft Dynamics AX
See Also
Using the command line to manage the AOS Run commands at startup (Client)
1. Open the Server Configuration utility (Start > Administrative Tools > Microsoft Dynamics AX Server Configuration). 2. Verify that the currently selected AOS instance and configuration are the ones you want to modify. 3. On the Application Object Server tab, in the TCP/IP port box, type the port you want the instance to run on, click Apply, and then click OK.
16
Microsoft Dynamics AX
17
Microsoft Dynamics AX
Allow debugging
You can set Microsoft Dynamics AX to allow debugging on an Application Object Server (AOS), or on a client that is running the .NET Business Connector or COM Business Connector.
18
Microsoft Dynamics AX
Encrypt data
By default, Microsoft Dynamics AX secures data sent across a network by using the remote procedure call (RPC) function RPC_C_AUTHN_LEVEL_CONNECT, which validates user credentials at the time a connection is established. You can also encrypt data if your security needs require it. When you turn on encryption, Microsoft Dynamics AX uses the RPC_C_AUTHN_LEVEL_PKT_PRIVACY call, which provides the highest security level available through RPC. For more information about RPC security, search for RPC security in MSDN : http://msdn.microsoft.com/. Note: Enabling encryption may decrease performance between five and ten percent. 1. Open the Microsoft Dynamics AX Configuration utility (Start > Control Panel > Administrative Tools > Microsoft Dynamics AX Configuration). 2. Verify that the currently selected instance and configuration are the ones you want to modify. 3. On the Connection tab, click Encrypt client-to-server communications, and then click OK.
The TCP window size is the amount of data received (in bytes) that can be buffered at one time on a connection. The sending host can send only that amount of data before waiting for an acknowledgment and window update from the receiving host. Server and Database Administration Guide 19
Microsoft Dynamics AX If the size per client/server request or response is kept below the TCP window size, the sender does not have to wait for an acknowledgment (ACK) when the window size is exceeded. If exceeding the TCP window size cannot be avoided, making as few TCP round trips as possible for each client/server request or response is important. 1. Open the Server Configuration utility (Start > Control Panel > Administrative Tools > Microsoft Dynamics AX Server Configuration). 2. Verify that the currently selected Application Object Server (AOS) instance and configuration are the ones you want to modify. 3. In the Minimum packet size to compress (in KB) field, choose a packet size. Choose the smallest useful packet size to compress. The larger the packet size chosen, the smaller the gains in performance.
20
Microsoft Dynamics AX For an Oracle connection, consider the following: Choose whether to connect using a net service or custom settings. In the Use this schema box, specify the schema under which the Microsoft Dynamics AX objects are stored in the database.
Test all tuning changes before implementing them in a production environment. In a test or development environment, make a single change and then test your system's performance before making another change.
21
Microsoft Dynamics AX
Tune connections
The following table lists common connection issues, and some adjustments to try in the Server Configuration Utility.
Symptom Adjustments to try
Results for common queries are returned slowly. Results for ad hoc queries are returned slowly.
Check to see that the appropriate indexes are in place. Decrease the Transaction retry interval value. Increase the Array fetch ahead value.
Tune queries
If queries in the system are running slowly, you may want to change settings for literals, string functions, or hints. Microsoft Dynamics AX no longer uses literals by default in form and report queries, or in complex-join queries. Adjust the use of literals Microsoft Dynamics AX may pass either parameters (placeholders) or literals (actual values) in queries. Parameters allow Microsoft Dynamics AX and the database server to reuse the query when search values change. They are preferred for high-frequency queries. Literals allow the database server to optimize the query for a specific piece of information. This provides an optimal query for that piece of information, but the database server must perform the optimization for every query executed. Literals may be used for long running queries such as complex joins.
22
Microsoft Dynamics AX A developer can override the default use of literals by specifying parameters in their code, or an administrator can override the use of literals in the Server Configuration Utility.
Symptom Adjustments to try Anticipated effect
Review the query plan statements sent to SQL Server and consider taking corrective action. Using literals may be one solution. Select Use literals in join queries from forms and reports. Select Use literals in complex joins from X++.
Long-running queries pass literals to the database. Processing time for longrunning queries should go down.
Adjust the use of autogenerated string functions Microsoft Dynamics AX embeds some string functions in SELECT statements automatically. String functions are included to support: Treating uppercase and lowercase versions of the same text as the same text (single case) for Oracle installations. Left justification or right justification.
When a string function is included in a query, the optimizer may have to choose a less-thanoptimal access plan, such as a table scan, for retrieving data. If customers do not require the use of mixed case outside Microsoft Dynamics AX and do not use left justification or right justification, these functions are not required and should be turned off. To improve performance, we recommend that all values be stored left-aligned by default. Adjust the use of hints In Microsoft Dynamics AX, you can allow developers to override the index selected by the query optimizer. In most situations, allowing the query optimizer to select an index for a query results in improved performance. If queries include INDEX hints and are running more slowly than expected, clear the Allow INDEX hints in queries option. Changes in the use of hints If you have upgraded to Microsoft Dynamics AX, the queries in your system may contain outdated Microsoft SQL Server hints. Configuration commands are no longer available to globally enable or disable many of the hints from previous versions. If hints are explicitly specified in an X++ statement, they are added to the SQL Server query that is generated. Otherwise, they are not added. Server and Database Administration Guide 23
Microsoft Dynamics AX The following changes have also been made: The OPTION (FAST), LOOP, and FORCE ORDER hints are not applied by default, but are applied if explicitly specified in X++. A FIRSTONLY hint in X++ is translated into the addition of a TOP 1 statement to the SQL Server query.
FASTFORWARD UPDATE. FOR UPDATE, NOLOCK,
cursors are used for all user queries unless a cursor has been marked as FOR
and READPAST, hints are added to statements depending on the type of the cursor that an X++ query has produced. No interface is available to modify these hints.
Configuration commands require that you use different syntax if you are setting them in a configuration file, or executing them in the Configuration Command to run at kernel startup field or from a command prompt. The syntax variations are provided in the following sections.
General options
This table describes the general options you can use to work with configurations and files.
Command in configuration file Command from command line Configuration utility option Description
-regConfig=<configname>
Configuration
Specify the name of the current group of settings for this AOS instance.
24
Microsoft Dynamics AX
-application= <applicationname>
Application instance
Specify the instance of an application that the AOS instance connects to. Specify the location of a directory containing an alternate kernel text data file (one of the Microsoft Dynamics AX label files). This is a binary command that is not set by default. When this value is absent, data sent between the AOS and its clients is compressed to speed client-server communications. If the value is present, then compression of packets is turned off. To turn on packet compression, remove the value from the configuration file. We recommend that you not disable compression. Disabling compression can negatively affect system performance and security.
-bindir=<path>
compression disabled,Int,1
-compression disabled
-compressionmin size=<number>
Specify the smallest useful packet size to compress. The larger the packet size chosen, the smaller the gains in speed.
directory,Text, <path>
-directory= <spath>
Specify the location of the application files to connect and write to.
25
Microsoft Dynamics AX
Command in configuration file Command from command line Configuration utility option Description
exposeserver printers,Int,1
-exposeserver printers
This is a binary command that is not set by default. When this value is present, clients are allowed to connect to printers that are connected to the AOS computer. The TCP/IP port that the AOS instance should use to connect to clients. The default value is 2712.
port,Text,<port number>
-port=<port number>
TCP/IP port
xppdebug,Text, <0,1>
-xppdebug=<0,1>
Enable breakpoints to debug X++ code running on this server Option not available in utility
Enable clients to trace their interactions with this AOS instance. The default is off (0). Code Access Security (CAS) is the mechanism in Microsoft Dynamics AX that is used to protect specific APIs. Enable, the default setting, activates CAS for all CASprotected APIs. If a CASprotected API is invoked without following the correct steps, an error is generated. Trace is used to simulate CAS being enabled. An error is not generated if a CAS-protected API is invoked incorrectly. Instead, debug information is written to the Infolog. Disable disables CAS entirely. Important: Do not set this option to Trace or Disable in production environments.
26
Microsoft Dynamics AX
Command in configuration file Command from command line Configuration utility option Description
Set the maximum number of concurrent client sessions. The minimum value is 0; the maximum value (and default) is 65535. Set the maximum number of concurrent Guest (anonymous user) sessions. The minimum value is 0; the maximum value (and default) is 65535.
Set the maximum number of concurrent Enterprise Portal sessions, including Guest sessions. The minimum value is 0; the maximum value (and default) is 65535.
-MaxConcurrentBC Sessions=<value>
Set the maximum number of concurrent Business Connector sessions, including all Web sessions. The default value is 65535.
maxMemLoad, Text,<value>
-MaxMemLoad= <value>
Set the maximum amount of memory usage (the maximum percentage of physical memory that is in use on the computer). The default value is 0.
-MaxConcurrent Sessions=<value>
Set the maximum number of client sessions this AOS instance will accept. The minimum value is 0; the maximum value (and default) is 65535.
27
Microsoft Dynamics AX
Command in configuration file Command from command line Configuration utility option Description
loadbalance,Int, <0,1>
-LoadBalance= <0,1>
Set this AOS instance to load balance client connection requests with other AOS instances that also have load balancing enabled. Enter a SysStartupCmd method to run when this client application starts. Enter any configuration command to run when the kernel starts.
startupcmd,Text, <command>
-startupCmd= <command>
extracmd,Text, <command>
-extracmd= <command>
createdsn,Text, <microsoftsql server, oracle> dsn,text,<port number> database,Text, <databasename> dbcli,Text, <ODBC, OCI>
Option not available in utility Database to connect to Option not available in utility
Specify the database to connect to. Run Microsoft Dynamics AX in either ODBC or OCI (Oracle) mode. ODBC is the default. SQL Server name.
dbserver,Text, <servername>
-dbserver= <servername>
28
Microsoft Dynamics AX
-connectionidle timeout=<0,1>
Leave the Retain a connection to the connection database when no transactions running when idle are running. Maximum idle time before closing Array fetch ahead Specify the amount of time to leave a database connection idle before closing it. Specify the maximum number of records that the system fetches at the same time. Starts as the local default computer setting of 100.
-connectionidle timeout=<time>
-fetchahead= <number>
hint,Text,1
-hint=<0,1>
Enable any query written with an INDEX hint to override the index selected by the database management system. Add LTRIM to all queries generated by Microsoft Dynamics AX. Using LTRIM forces the database to perform a table scan, which can slow query results. Set to 2 to enable this feature, and 0 to disable it. Set to 1 to override the ordering specified by the index on the data source, using the order of the columns as specified in the WHERE clause. This can improve query performance.
hint,Text,2
-hint=<0, 2>
Include LTRIM in all SELECT statements to remove leading space from rightaligned columns
ignoredatasource index,Text,<0,1>
Specify the number of times to try connecting to the database before failing. 29
Microsoft Dynamics AX
Command in configuration file Command from command line Configuration utility option Description
Specify the interval between attempts to connect to the database in milliseconds. Specify the maximum number of database cursors to keep open for reuse in a connection. Starts as your local computer setting, which defaults to 90. Specify the delay before reexecuting a transaction after a deadlock. The default value is 5 seconds. Specify the maximum size of the data retrieval buffer. The larger the buffer, the greater the number of records transferred at the same time. Starts as your local default computer setting of 24. Specify that Microsoft Dynamics AX use literals rather than parameters for complex joins to optimize performance.
retry,Text,<time>
-retry=<time>
sqlbuffer,Text, <number>
-sqlbuffer= <number>
sqlcomplexliterals ,Text,<0,1>
-sqlcomplex literals=<0,1>
Use literals in join Specify that Microsoft Dynamics queries from AX use literals rather than forms and reports parameters in long-running queries to optimize performance.
30
Microsoft Dynamics AX
Tracing options
This table describes the options you can use to trace calls between the AOS, the database and clients. Note: The logdir directory where the trace files are stored cannot be changed. It is the server installation directory\log.
Command in configuration file Command from command line Configuration utility option Description
traceStart,Int,1
-TraceStart=
Specify whether trace should be started or stopped: 0 stop trace 1 start trace The default value is 0.
traceevents enabled,Text, <1; 100; 101; 200; 201; 202; 203; 204; 205>
-TraceEvents Enabled=<1; 100; 101; 200; 201; 202; 203; 204; 205>
See below
Specify the event types to be enabled. You can enable multiple event types using a semi-colon (;) as the delimiter. The default value is 1.
traceevents enabled,Text,1
-TraceEvents Enabled=1
Trace all remote procedure call (RPC) round trips from any client to the server. Trace all X++ methods that are invoked on the server. Trace all function calls that are invoked on the server. Trace each time the AOS connects and disconnects from the database. Trace all transactions that use the TTSBegin, TTSCommit, and TTSAbort statements.
traceevents enabled,Text,201
-TraceEvents Enabled=201
traceevents enabled,Text,202
-TraceEvents Enabled=202
SQL statements Trace all SQL Server statements that are invoked on the server. 31
Microsoft Dynamics AX
Command in configuration file Command from command line Configuration utility option Description
traceevents enabled,Text,203
-TraceEvents Enabled=203
Bind variables
Trace all columns that are used as input bind variables. Note: SQL Statements (202) must also be on to enable this option.
traceevents enabled,Text,204
-TraceEvents Enabled=204
Row fetch
Trace all rows that are fetched using SQL Server. Note: SQL Statements (202) must also be on to enable this option.
traceevents enabled,Text,205
-TraceEvents Enabled=205
Count all rows that are fetched, and record the time spent fetching. Note: SQL Statements (202) must also be on to enable this option.
Specify the maximum call depth to be traced for X++ methods. Note: TraceEventsEnabled must also be set to 100 to use this command. The default value is 3.
tracemaxfilesize, Text,<number>
Option not Specify the maximum size for available in utility each trace file in megabytes (MB). The default value is 10 MB.
tracebuffersize, Text,<number>
-TraceBufferSize= <0:64>
Option not Specify the Event Tracing for available in utility Windows buffer size, in kilobytes (KB). The maximum size that can be set is 64 KB. The default value is 20 KB.
32
Microsoft Dynamics AX
Command in configuration file Command from command line Configuration utility option Description
traceallowclient, Int,1
-TraceAllowClient
This is a binary command that is not set by default. Specify whether client tracing is allowed on this AOS instance.
company,Text, client,Text,thin application,Text,standard broadcast,Text, aol,Text,sys aolcode,Text, native,Int,0 sqluser,Text, hassqlpwd,Int,0 sqlpwd,Text, startupmsg,Text, localappldoc,Int,0 localsysdoc,Int,0 applshare,Int,0 applexclusive,Int,1 startupcmd,Text,test hascompwd,Int,0 Server and Database Administration Guide
Client Legacy Client Legacy Client Client Legacy Legacy Legacy Legacy Client Legacy Legacy Legacy Legacy Client Legacy 33
Microsoft Dynamics AX
Value in configuration file Applies to
34
Microsoft Dynamics AX
35
Microsoft Dynamics AX
36
Microsoft Dynamics AX
37
Microsoft Dynamics AX
This topic describes how to manage security for client and business connector configurations. This topic describes how to manage a client configuration.
Microsoft Dynamics AX
Copy a configuration
1. In the Configuration list, select the configuration you would like to create a copy of. 2. Click Manage, and then click Create configuration: 3. In the Create configuration dialog box, in the Name box, type a name. 4. Click Copy settings from the active configuration, and then click OK.
Rename a configuration
1. In the Configuration list, select the configuration you would like to rename. 2. Click Manage, and then click Rename configuration. 3. In the Rename configuration dialog box, in the New name box, type a name, and then click OK.
39
Microsoft Dynamics AX
Load a configuration
You can either load a configuration that is stored in the local registry or import a configuration file. Although you can use the Open command to view a saved configuration, Microsoft Dynamics AX does not store the settings from the opened file to the registry. To store saved configuration files to the registry, you must use the Import command. Load a configuration from the registry In the Configuration list, select the configuration you would like to open.
Import a configuration file 1. Click Manage, and then click Import. 2. Browse to the configuration file you would like to use (*.axc), and open it.
Save a configuration to the registry 1. Verify that the currently selected configuration is the one you want to save. 2. Make any changes to the currently selected configuration that you want. 3. Click Apply, and then click OK. Export a configuration to a file Use this procedure if you want to copy a configuration to a client on another computer. 1. Verify that the currently selected configuration is the one you want to save. 2. Click Manage, and then click Export configuration to a file. Choose a location and name for the configuration file, and then click Save. The file is saved with an .axc extension. Export all configurations to a file Use this procedure if you want to copy all configurations from one client. 1. Verify that the currently selected configuration is the one you want to save. 2. Click Manage, and then click Export All. Choose a location and name for the configuration file, and then click Save. The files are saved with an .axc extension.
40
Microsoft Dynamics AX Save a configuration file with a new name Use this procedure if you want to create a copy of the configuration file you have been using. 1. Import or open a configuration file. 2. Make changes to settings. 3. Click Manage, and then click Save configuration file as. Choose a location and name for the configuration file, and then click Save.
Delete a configuration
1. Verify that the currently selected configuration is the one you want to delete. 2. Click Manage, and then click Delete configuration.
41
Microsoft Dynamics AX
Provides a description of how to change the Microsoft Dynamics AX log location. Provides a description of how to set the company to open on startup. Provides a description of how to run commands at the startup of Microsoft Dynamics AX. Provides a description of how to display a message at the startup of Microsoft Dynamics AX. Provides a description of how to connect a client to a different Application Object Server instance. Provides a description of how to enable printing from a computer running an Application Object Server. Provides a description of how to encrypt data sent between the Application Object Server and the client.
Encrypt data
42
Microsoft Dynamics AX
See Also
Using the command line to manage the AOS Run commands at startup (Server)
43
Microsoft Dynamics AX
44
Microsoft Dynamics AX
45
Microsoft Dynamics AX
Microsoft Dynamics AX
47
Microsoft Dynamics AX
48
Microsoft Dynamics AX
49
Microsoft Dynamics AX Work with a system administrator to create a new account for the Business Connector before you install it. We recommend that the account be set up as follows: Must be a Windows domain account Must be a dedicated account (used only by Business Connector) Must have a password that does not expire Must not have interactive logon rights Must not be a Microsoft Dynamics AX user. Important: If a malicious user learns the Business Connector proxy credentials (name and password), that user could gain unauthorized access to sensitive information, and potentially damage the Microsoft Dynamics AX application. For this reason, only Microsoft Dynamics AX administrators should know the proxy credentials. To set up and configure the Business Connector proxy, you must perform the following steps. 1. Create the proxy account in Active Directory . 2. Add the proxy account to the IIS local Windows group. 3. Configure the IIS application pool. 4. Install the .NET Business Connector. 5. Specify the Business Connector proxy user in Microsoft Dynamics AX.
50
Microsoft Dynamics AX 3. Add the Business Connector proxy account to the following groups: IIS_WPG (IIS Worker Process Group) STS_WPG (STS Worker Process Group), if running Windows SharePoint Services
51
Microsoft Dynamics AX
Copy a configuration
1. In the Configuration list, select the configuration you would like to create a copy of. 2. Click Manage, and then click Create configuration: 3. In the Create configuration dialog box, in the Name box, type a name. 4. Click Copy settings from the active configuration, and then click OK.
Rename a configuration
1. In the Configuration list, select the configuration you would like to rename. 2. Click Manage, and then click Rename configuration. 3. In the Rename configuration dialog box, in the New name box, type a name, and then click OK.
52
Microsoft Dynamics AX
Load a configuration
You can either load a configuration that is stored in the local registry or import a configuration file. Although you can use the Open command to view a saved configuration, Microsoft Dynamics does not store the settings from the opened file to the registry. To store saved configuration files to the registry, you must use the Import command. Load a configuration from the registry In the Configuration list, select the configuration you would like to open.
Import a configuration file 1. Click Manage, and then click Import. 2. Browse to the configuration file you would like to use (*.axc), and open it.
Save a configuration to the registry 1. Verify that the currently selected configuration is the one you want to save. 2. Make any changes to the currently selected configuration that you want. 3. Click OK. Export a configuration to a file Use this procedure if you want to copy a configuration to a client on another computer. 1. Verify that the currently selected configuration is the one you want to save. 2. Click Manage, and then click Export configuration to a file. Choose a location and name for the configuration file, and then click Save. The file is saved with an .axc extension. Export all configurations to a file Use this procedure if you want to copy all configurations from one client. 1. Verify that the currently selected configuration is the one you want to save. 2. Click Manage, and then click Export All. Choose a location and name for the configuration file, and then click Save. The files are saved with an .axc extension.
53
Microsoft Dynamics AX Save a configuration file with a new name Use this procedure if you want to create a copy of the configuration file you have been using. 1. Import or open a configuration file. 2. Make changes to settings. 3. Click Manage, and then click Save configuration file as. Choose a location and name for the configuration file, and then click Save.
Delete a configuration
1. Verify that the currently selected configuration is the one you want to delete. 2. Click Manage, and then click Delete configuration.
54
Microsoft Dynamics AX
The Plan data migration section offers additional guidelines to follow when planning to import data into Microsoft Dynamics AX.
If you allow table data to be edited and then imported to the system, you risk providing increased access to the Microsoft Dynamics AX system.
55
Microsoft Dynamics AX
6. Click the Include table groups tab and decide which table groups should be included.
56
Microsoft Dynamics AX
Overview
Add or remove tables, and for each table: Define whether notes are included when data is imported or exported. The Note option is relevant only if you add a document of the type Note by using the document management system. Select whether a query should be used to limit the data that is exported from each table, and set up the query by selecting Export criteria.
57
Overview
Add or remove tables, and for each table: In the Export status column, define how export is performed. You can select Export to, Exported in part, or Exported in total. If the status is Exported in part or Exported in total, then the table will not be included in any later exports. In the Import status column, define how import is performed. You can select Delete and import, Import, Imported in part, or Imported in total. If the status is Imported in part or Imported in total, then the table will not be included in any later imports. In the File name column, select the file from which data is imported or to which data is exported. In the Use export criterion column, select whether special criteria should be used for the export, for example only customer account numbers within a certain range or customers from certain ZIP codes. When it is selected, the actual criteria are defined by clicking the Export criteria button. In the Exclude table column, select whether to exclude a table from export or import instead of removing it from the definition group. In the Validation level column, select whether data should be validated, and if so, whether it is validated after each field or after each table. If Table is selected, then validateWrite is executed. If Field is selected, then validateField and validateWrite are executed.
This tab also displays status after data has been exported or imported. Conversion Setting up this tab is optional. Add X++ code to manipulate data before it is added to tables in Microsoft Dynamics AX during import. Setting up this tab is optional. Add X++ code to manipulate data before it is added to the current record in Microsoft Dynamics AX during import. This code is executed after any code on the Conversion tab. Log files Setting up this tab is optional. This tab is a status page for import or export success. You can select whether to view a log file for information about data that was not imported. Preview the data that is to be exported or imported by using the settings that are defined on the other tabs. If no file exists, you receive an error message. 58
Import criteria
Preview
Overview
Add or remove tables, and for each table: In the Import status column, define how import is performed. You can select Delete and import, Import, Imported in part, or Imported in total. If the status is Imported in part or Imported in total, then the table will not be included in any later import. In the File name column, select the file from which data is imported. In the Validation level column, select whether data should be validated, and if so, whether it is validated after each field or after each table. If Table is selected, then validateWrite is executed. If Field is selected, then validateField and validateWrite are executed.
This tab also displays status after data has been imported. General Use Field separator to specify how the fields are separated in the import file. If a separator is not defined, then the start and end positions must be defined by using Field setup. The number of fields in each record is automatically calculated when you select the field separator. The Validation level field is the same as the one on the Overview tab. We recommend that you use Field level or Table level validation. In the Unique field drop-down list, select the field that is unique for each record. After a record with that identifier is imported, duplicate records are skipped.
Conversion
Setting up this tab is optional. Add X++ code to manipulate data before it is added to tables in Microsoft Dynamics AX during import. Setting up this tab is optional. Add X++ code to manipulate data before it is added to the current record in Microsoft Dynamics AX during import. This code is executed after any code on the Conversion tab. Setting up this tab is optional. This tab is a status page for import success. You can select whether to view a log file for information about data that was not imported. Preview the data that is to be exported or imported by using the settings that are defined on the other tabs. If no file exists, you receive an error message.
Import criteria
Log files
Preview
59
Microsoft Dynamics AX 4. To set up individual fields for each table, click the Field setup button. The form looks different depending on the type of the definition group. 5. Close the form to save the setup. 6. To start the actual export or import, click Export to or Import on the Data export/import dialog box (Administration > Periodic > Data export/import).
Exporting data
To determine the best method for exporting data, consider the purpose of the export, the amount of data, and the type of the data that you want to export. Microsoft Dynamics AX provides the following export mechanisms: Export default data Export data to Microsoft Office Excel Export standard data
60
Microsoft Dynamics AX 3. In the File name field, use the browse button to select a location for the file that contains the export data, and type a file name. Important: Be sure to save exported files in a folder that has appropriately restricted permissions. In particular, allowing access to the data from the following tables can potentially expose confidential or security information: SysConfig, SysUserInfo, AccessRightsList, UserGroupInfo, UserInfo, and UserGroupInfo. If unsecured data from these tables is edited and then imported, you run the risk of potentially providing increased access to the Microsoft Dynamics AX system.
4. Select the Note check box to export document management notes. 5. Click OK. The results of the export is a data file (*.dat) and a definition file (*.def). If you import the data file and the definition file to another Microsoft Dynamics AX installation, these files must be in the same folder.
See Also
Import default data
Microsoft Dynamics AX
5. Select the Execute on AOS check box to have the report executed by the AOS server instead of by the client. This option typically improves performance. 6. Click the OK button to start the export.
62
Microsoft Dynamics AX
Importing data
To determine the best method for importing data, consider the purpose of the import, the amount of data, and the type of the data that you want to import. Microsoft Dynamics AX provides the following import mechanisms: Import default data Import custom data and data from other systems Create a template in Microsoft Office Excel Enter data in Microsoft Office Excel Import data from Microsoft Office Excel
63
Microsoft Dynamics AX 4. In the File name page: a. Locate the file that contains the default data. b. Select the Execute on AOS check box to have the import executed by the AOS server instead of by the client. This option will typically improve performance. c. If you want to import data into tables that are not company accounts-specific, select Include system and shared tables.
d. Click Next to move to the next page. 5. Click Next in the Generate table list page. The wizard then provides an overview of the tables in the import file. 6. In the Select tables page, you can clear tables that should not be imported. The import is not performed until you acknowledge that the tables presented are the correct set to import. When you have made a selection, click Next to move to the next page. Note: If you import a text field from the Microsoft Office Excel spreadsheet with an integer greater than 2.1 million, it is not imported into Microsoft Dynamics AX, and the column displays in red. Use an integer less than 2.1 million. 7. Click Next in the Generate table list page. 8. In the Select tables to be deleted page, select the tables to delete from the Microsoft Dynamics AX system before you import the default data. This page shows a list of tables that contain records. By selecting a table, the records will be replaced by the imported data. If you do not select to delete the table, then you will not import default data to these tables. When you have made your selection, click Next to move to the next page. 9. Click Finish to save your changes and start the import, or click Cancel to exit the wizard.
See Also
Export default data
64
Microsoft Dynamics AX
See Also
Import data from Microsoft Office Excel
4. Click Next > to generate the field list on the Generate field list page, and then click Next > again to select the fields that you want to use.
65
Microsoft Dynamics AX 5. On the Select fields page, select the fields from the tables that you want to be shown in the template. The shaded check boxes indicate that a field is either mandatory or part of a unique index and therefore necessary to maintain data consistency. Fields marked with a yellow padlock are system fields and are not selected by default. 6. On the Import definition group page, select Create import definition group? to create an import definition group based on the template. A definition group contains definitions for each worksheet in a workbook and is used when importing the workbook to Microsoft Dynamics AX. The definition group is called "EXL00000xx" where "xx" is a consecutive number. 7. On the Export data page, select which of the following actions you want to take: Export data Export data from the current company to the Excel workbook. Create supporting tables worksheet Include supporting tables. Supporting tables are typically populated with data. Create a Microsoft Office Excel project file Create an Excel project file. The project file references the exported Excel workbook.
8. Click Finish to complete the wizard. Note: By default, the View workbook after creation? field is selected and the workbook opens after the wizard is completed. Clear this option if you do not want to open the workbook now.
Format details
For each Microsoft Dynamics AX table selected, a template is presented on a separate worksheet. Field names are displayed in the first row. Fields occur in the same order that they appear in the table. Do not change this order. If you change the order, the data will not import correctly. Array field names contain the symbol '@'. For example, Dimension@Department, Dimension@Cost center, and Dimension@Purpose. Mandatory fields in Microsoft Dynamics AX have their corresponding columns in Microsoft Office Excel highlighted in yellow.
66
Microsoft Dynamics AX
Examples
If you enter telephone numbers, Telex numbers, swift numbers, postal (ZIP) codes or other numbers that contain parentheses and dashes, Microsoft Dynamics AX accepts them as strings. If you enter a number such as 10000 into a field where a real number is expected, Microsoft Dynamics AX converts it to 10,000.00 by inserting the separators. However, if you enter a string, such as "abc" in the same field, the data is not imported. To import the DayWeekMonth enum with the value Week, you must enter 'Week' in the Excel worksheet. Notes: You cannot import data entered in Excel in a format that is incompatible with the data type in Microsoft Dynamics AX. Mandatory rows left blank in Excel that are imported into Microsoft Dynamics AX integer fields are "zero-filled" in Microsoft Dynamics AX. The best way to avoid unwanted data in Microsoft Dynamics AX is to enter valid data in all yellow-highlighted columns in the worksheet.
67
Microsoft Dynamics AX 1. Click Administration > Periodic > Data export/import > Excel spreadsheets > Template Wizard. The Microsoft Office Excel Template Wizard helps you create one or more templates in Microsoft Office Excel where you can enter data, and then import the data into Microsoft Dynamics AX. The wizard creates a worksheet in the workbook for each table that you select. Complete the wizard, as described in Create a template in Microsoft Office Excel. While completing the wizard, select to create a definition group. 2. Open the Excel workbook that contains the templates and enter necessary data, as described in Enter data in Microsoft Office Excel. Note: Protect data by adding password protection to the worksheet or workbook using Excel's password protection feature. 3. Click Administration > Periodic > Data export/import > Default data > Definition group and select the definition group that was created by the Template wizard. Click Import. The Microsoft Office Excel import dialog box appears. 4. Select the Excel workbook to import data from and then click OK. Based on the worksheet name, the import allocates the contents of each worksheet into the corresponding table in Microsoft Dynamics AX.
The Microsoft Office Excel template lists each field to be imported into Microsoft Dynamics AX. When populating the Excel spreadsheet, many fields are associated with another Microsoft Dynamics AX table. Therefore, make sure that you use the correct codes. For example, Customer groups may be defined as DOM = Domestic and FOR = Foreign; DOM or FOR should be entered on the spreadsheet. The values for these types of userdefined fields are not available from Excel. However, lists of the setup values can be printed from Microsoft Dynamics AX.
68
Microsoft Dynamics AX Data import from Microsoft Office Excel into Microsoft Dynamics AX is optimal when the data types in the Excel worksheet match the ones in the Microsoft Dynamics AX fields. When a template based on Microsoft Dynamics AX is created, the cells in the worksheet have an Excel format called 'Text'. The contents of cells with text format are treated as text even when a number is in the cell. This format is useful because numbers frequently contain spaces, parentheses, or dashes. This can produce poor data if they are saved in the 'Number' format. When Excel data is imported, Microsoft Dynamics AX converts the data to the required format only if the entered data type is compatible with the required type. For example, a string type entered in an Excel cell that should be imported into a Microsoft Dynamics AX field of integer type is not imported into Microsoft Dynamics AX. This also means that wherever enum values are expected, the actual string value must be entered instead of the representative integers. Begin entering data starting at row 7. Caution: Rows 2 through 6 in the workbook are used to map the fields back to Microsoft Dynamics AX and are hidden deliberately. Do not delete them. Verify that all required fields are populated before importing. Complete any additional fields that your old system may not have had available. Edit records as necessary to clean up the database. Note: Remember that Microsoft Dynamics AX has already created the mapping of this template to the Microsoft Dynamics AX database. Therefore, do not delete or rearrange columns. If you are no longer using a column, hide it. Before populating the whole spreadsheet, try importing a few records to verify the import is working correctly. Verify the import status before re-importing. The status is used to determine whether the re-import should replace or append the existing records. Check the status by clicking the Table setup button in the Definition group.
See Also
Create a template in Microsoft Office Excel Enter data in Microsoft Office Excel
69
Microsoft Dynamics AX
Administrator permissions
There is no requirement for the Microsoft Dynamics AX administrator to be a Windows domain administrator to import users from Active Directory. When a domain administrator in Active Directory is logged in to Microsoft Dynamics AX as a Microsoft Dynamics AX administrator and tries to import Active Directory users, the administrator can see all users in Active Directory and can import them into Microsoft Dynamics AX successfully. If a Microsoft Dynamics AX administrator who is not a domain administrator in Active Directory tries to import Active Directory users, only a subset of the users in Active Directory will appear. This occurs because of security functionality in the Active Directory Group Policy Objects (GPO). To allow Microsoft Dynamics AX administrators rights to Active Directory, you must grant Authenticated users security group membership to the Microsoft Dynamics AX administrators. They can then see the complete list of Active Directory users during import.
70
Microsoft Dynamics AX
Alias ID duplicates
When you import users from Active Directory into Microsoft Dynamics AX, the wizard tries to create Microsoft Dynamics AX users by creating Microsoft Dynamics AX user IDs from the Active Directory aliases. But, Microsoft Dynamics AX user IDs are limited to five characters, whereas the Active Directory alias can be up to 255 characters. If the first five characters of the Active Directory alias are the same for more than one user, then the wizard then generates alternative Microsoft Dynamics AX user IDs for these users and displays them. When generating alternative user IDs, if the user alias has more than five characters, then the first four characters from the first name and a single character from the last name are used. If there are still duplicates, then the first three characters of the first name and two characters from the last name are used. You can change any of the user IDs. When you approve the new user IDs, the users are created in Microsoft Dynamics AX.
71
Microsoft Dynamics AX
72
Microsoft Dynamics AX
Migrating data
This section contains information about how to migrate data from your current system to Microsoft Dynamics AX. The section contains the following topics: Plan data migration Migrate customer, vendor, and item data by using the Excel Template Wizard Migrate historical transaction data Migrate open transactions
73
Microsoft Dynamics AX Financial data is imported into a Microsoft Dynamics AX journal, but the data is not imported directly into data files. Because of the complex file structures in Microsoft Dynamics AX, financial data should never be imported directly into the data file, because this action will cause inconsistencies in other files. After the financial data has been converted into a journal, the journal can be reviewed and posted. When the journal is posted, all of the necessary Microsoft Dynamics AX files are updated. Almost any table can be imported into Microsoft Dynamics AX, but it may be easier or more effective to enter some tables manually. For example, many of the setup forms, such as Terms of payment, do not have many records, so it is faster to enter them manually. Consider cleaning up the database. For example, determine whether old records can be deleted or archived, whether the current database contains duplicate records, and whether you want to change numbering schemes.
Migrate customer, vendor, and item data by using the Excel Template Wizard
Before you import master data (such as customer, vendor, and item records) into Microsoft Dynamics AX, complete the required setup for the records that you will import. Because field names and values in Microsoft Dynamics AX may be different than those in the current system, we recommend that you create a record manually to understand Microsoft Dynamics AX fields and how they correspond to fields in your current system. After you decide how fields and values from the old system correspond to the fields and values in Microsoft Dynamics AX, use the Template Wizard to create a Microsoft Office Excel template. Do not convert all records at once or attempt to work with a blank template. Instead, we recommend that you create a few records in Microsoft Dynamics AX and run though the conversion process. Ensure that the template meets your needs and that the template converts the data as you expect it to. As you create the template by using the wizard, verify the template by populating it with a few records and importing the data. If the template does not meet your expectations, modify it and try again. Start the Microsoft Office Excel Template Wizard by clicking Administration > Periodic > Data export/import > Excel spreadsheets > Template Wizard.
74
Microsoft Dynamics AX 5. Select the fields to use in the template, and then click Next. Note: Mandatory fields are marked with a red padlock symbol and cannot be removed from the list. 6. Select whether you want to create an import definition group for the workbook that contains the template, and then click Next. The import definition group contains a definition for each worksheet in the workbook. The definition group can be used when you import the workbook. 7. Select whether you want to export data to the workbook, and then click Next. 8. Click Finish. 9. Use Excel to map Microsoft Dynamics AX fields to those in the current system and to populate the template with data.
75
Microsoft Dynamics AX 3. Select the table to create a template for. If you are creating the Item table template, select InventTable from the list of available objects, and then click Next. If you are creating the Inventory module parameters template, select InventTableModule from the list of available objects, and then click Next. If you are creating the Warehouse items template, select InventItemLocation from the list of available objects, and then click Next.
4. Select the fields to use in the template, and then click Next. Important For the Inventory module parameters template, make sure that the following objects are selected: Invent, Purch, and Sales. Mandatory fields are marked with a red padlock symbol and cannot be removed from the list. 5. Select whether you want to create an import definition group for the workbook that contains the template, and then click Next. The import definition group contains a definition for each worksheet in the workbook. The definition group can be used when you import the workbook. 6. Select whether you want to export data to the workbook, and then click Next. 7. Click Finish. 8. Use Excel to map Microsoft Dynamics AX fields to those in the current system and to populate the template with data.
See Also
Import data from Microsoft Office Excel Enter data in Microsoft Office Excel
76
Microsoft Dynamics AX
77
Microsoft Dynamics AX
General information about AIF data exchange including topics about planning, security, and troubleshooting. Covers how AIF is used in the procure-to-pay and orders-to-cash business scenarios. Information on configuring and maintaining data exchanges using one of the AIF adapters: file system, Message Queuing (MSMQ), or BizTalk . Information on configuring and maintaining data exchanges using the AIF Web services. Covers how to maintain AIF integrations and research problems when they arise.
Adapter-based exchanges
For more information about AIF for software developers, see "Integrating Other Applications with Microsoft Dynamics AX" in the Microsoft Dynamics AX SDK Help.
78
Microsoft Dynamics AX
Integration process
Whether you require integration with internal legacy systems or external trading partners, the integration process involves common key steps: 1. In a typical integration scenario, users who have business expertise first determine the document exchange needs. These are requirements from a business perspective. The business users work with the implementation team to specify: What data is to be exchanged Any business logic related to that data The external systems with which data is to be exchanged The conditions under which data is sent from or received by Microsoft Dynamics AX
2. The partner or system implementer works with the customer and their IT staff to determine the hardware and software requirements for AIF. They analyze the existing environment and recommend any new hardware or software that must be installed. 3. The customer IT staff install and configure any required hardware and software to support AIF. 4. The partner or customer developer programs the document exchange. They may make customizations to the AIF documents or create new documents to meet the requirements of the business users. How AIF is configured depends in part on the network environment. Therefore, the developer may work with IT staff when implementing an integration. 5. IT staff monitor the document exchanges and troubleshoot any errors that are generated.
79
Microsoft Dynamics AX A high-level view of the process of integrating Microsoft Dynamics AX with other systems
80
Microsoft Dynamics AX
81
Microsoft Dynamics AX
Performance
AIF now supports the ability to scale up message processing when using the AIF adapters by adding AOSes. You can now define whether messages are processed sequentially or in parallel. If parallelism is implemented, messages can be processed in any order by multiple AOSes. After implementing parallel message processing, specific messages can still be designated for sequential processing.
New documents
AIF includes support for an enlarged set of frequently used documents. Documents new to Microsoft Dynamics AX 2009 include the following.
Document Supported service operations (Create, Read, Update, Delete)
Address Absence Request Bill of Materials (BOM) Business Sector Cash Discount Contact Person Credit Card Customer Customer Group Customer Payment Journal Customer Quotation Expense Report Fixed Asset Fixed Asset Condition Fixed Asset Group Fixed Asset Location Server and Database Administration Guide
Microsoft Dynamics AX
Document Supported service operations (Create, Read, Update, Delete)
Fixed Asset Major Type General Journal Item Item Dimension (Color) Item Dimension (Configuration) Item Dimension (Size) Item Dimension Combination Leads Payment Terms Product Groups Product Picking List Project Hour Journal Return Order Acknowledgment Return Order Document RFQ RFQ Reply Route Card Sales Confirmation Sales Quotation Sales Forecast DMP Service Agreement Service Order Shipping Methods Transfer Order Travel Card Unit Unit Conversion Server and Database Administration Guide
R CR CR R R R R C R R C C R CR R C C R R R R CR R CR C R R 83
Microsoft Dynamics AX
Document Supported service operations (Create, Read, Update, Delete)
Vendor Vendor Group Vendor Payment Warehouse Work Center Worker Attendance
CR CR R R CR CRUD
In addition to these new documents, the sales order document has been updated to support multi-site functionality as well as the ability to update and delete data. Partners and customers can easily customize and extend the existing application programming interfaces (APIs) by using the Microsoft Dynamics AX software development kit (SDK). The SDK includes a service wizard that developers can use to easily create their own custom document services.
84
Microsoft Dynamics AX Before writing any code or configuring document exchanges, the implementation team should consider the following questions.
Category Question Design impact
Data
What data elements are involved in the exchange and what screens do those elements come from? Are there any calculated values? Is the data being sent from Microsoft Dynamics AX to an external system or is the data received by Microsoft Dynamics AX from an external system? Does the external system request data from Microsoft Dynamics AX or is there an event in the application that triggers the sending of data to the external system? Are records in Microsoft Dynamics AX being created, updated, or deleted?
Helps determine which AIF documents support the business needs. Helps determine how a document exchange is configured.
Data
Data
Data
Helps determine whether the AIF documents will need any customizations.
Data
What are the business rules associated with Helps determine whether any the data? For example, if data is created or customizations must be made updated, which data elements are mandatory? to existing AIF documents. If data is deleted, what are the conditions under which a record can be deleted? Do the documents that ship with Microsoft Dynamics AX contain the data that must be exchanged? Helps determine whether any customizations have to be made to existing AIF documents or if new documents must be created. If the existing documents do not support some of the data integration requirements, developers may need to make customizations. Enables the team to determine whether AIF value mapping or XSLT transformations should be used.
Data
Data
Do the relevant documents support the actions that must be performed on the data (read, create, update, or delete)?
Data
Does the data need to be transformed by Microsoft Dynamics AX? This could be transformations that need to be performed before data is sent or when data is received. What is the extent of the data transformations?
85
Microsoft Dynamics AX
Category Question Design impact
Configuration
Does the local Microsoft Dynamics AX system have any restrictions on how data is exchanged?
Determines how a document exchange is configured. For example, if there is a requirement to use Message Queuing as a transport mechanism, then the MSMQ adapter would be used and the exchange would be asynchronous. Determines how a document exchange is configured. Determines how a document exchange is configured.
Configuration
Does the external system have any restrictions on how data is exchanged? Are there any constraints on the data? For example, is the document exchange limited to a particular vendor or customer? Is the external system an in-house system or external trading partner?
Configuration
Configuration
Note: This planning information is a guideline for what you may need to consider when planning your data integration. For more information about your specific implementation, contact your partner.
86
Microsoft Dynamics AX There are two methods for exchanging data in AIF: Web services - A data exchange in which a Microsoft Dynamics AX service is consumed an external system. Adapters - A data exchange in which Microsoft Dynamics AX adapters are used to communicate with the external system. Microsoft Dynamics AX adapters support the following transport mechanisms: File system Message Queuing (MSMQ) BizTalk Server
Adapter-based exchanges
An adapter-based exchange uses an adapter to convert the document into the proper format for exchange by means of a particular transport mechanism, such as Message Queuing (MSMQ). Adapter-based exchanges are asynchronous because they involve moving the document into a queue where it waits for processing by a Microsoft Dynamics AX batch job. Adapter-based exchanges require configuration of an adapter and a channel for use by AIF. For asynchronous, adapter-based exchanges, you configure and control the Microsoft Dynamics AX batch jobs that process documents in the AIF queues.
87
Microsoft Dynamics AX Microsoft Dynamics AX includes the functionality to enable connections with the following asynchronous adapters: File system Message Queuing (MSMQ) BizTalk Server Note: Although adapter-based exchanges are asynchronous, if you use the BizTalk adapter, it is possible to configure the data exchange to be synchronous or asynchronous. For more information about data exchanges using adapters, see Adapter-based exchanges and Configuring document exchanges with adapters.
By using outbound exchanges in AIF, you can send documents and data to your trading partners. You receive documents and data from endpoints in an inbound exchange. Send documents and data Sending a document can be initiated by clicking a button on a form, such as the Send electronically button on the Chart of accounts form. For more information, see topics "How to: Send and receive electronic documents automatically" and "How to: Send documents manually" in the Application and Business Processes Help. Receive documents and data When documents are received in an inbound transfer, data is added, updated, deleted or changed in the Microsoft Dynamics AX database. For this reason, you should carefully consider how to ensure the security of your Microsoft Dynamics AX system when configuring the Microsoft
88
Microsoft Dynamics AX Dynamics AX users associated with an endpoint. Be sure that endpoint users are trusted by your business organization.
See Also
Adapter-based exchanges Configuring document exchanges with adapters Web services-based exchanges Configuring document exchanges with Web services
You must also set the appropriate security keys and record-level security for any users that are granted access to Microsoft Dynamics AX through AIF, to help prevent unauthorized data access. For more information, see "Manage record level security" in the Application and Business Processes Help.
89
Microsoft Dynamics AX Certain actions cause data to be written directly to the Microsoft Dynamics AX database without manual end-user verification (for example, creating exchange rates). When configuring endpoints and creating new actions, be careful to restrict access to trusted and reliable partners and applications. For more information about the behavior of individual documents, see "Standard Axd Documents" in the Microsoft Dynamics AX SDK Help.
Trusted intermediaries
Trusted intermediaries are middleware applications that reside between external endpoints and AIF. That is, they are Microsoft Dynamics AX users (or user groups) that are authorized to submit inbound requests on behalf of the endpoint. A trusted intermediary prevents an unauthorized user from accessing AIF and is typically used in a business-to-business data exchange scenario. BizTalk Server installations and Electronic Data Interchange (EDI) services are examples of systems that can act as trusted intermediaries and submit inbound requests. These systems can be designated as trusted intermediaries if they can be trusted to reliably and accurately identify who has submitted the requests they forward to AIF. Part of the trusted intermediaries' responsibility is to ensure that messages from untrusted third parties are never allowed access to your system. If AIF is used strictly for in-house integrations, and the users who submit documents to AIF exist as Microsoft Dynamics AX users, then trusted intermediaries are not required. However, if you need to receive messages from systems or trading partners outside your Microsoft Dynamics AX system (that is, from Microsoft Dynamics AX users with the External check box selected on the User form), trusted intermediaries must always be used. To use them, you should be aware of the following requirements. A trusted intermediary must: Be created as a valid Microsoft Dynamics AX internal user (the External check box is not selected on the User form). Be known to you as representing a valid partner or a trusted system. Be configured within AIF by selecting the Use trusted intermediary check box on the Users tab in the Endpoints form and adding the Microsoft Dynamics AX internal user that represents the trusted intermediary. For more information about configuring users in Microsoft Dynamics AX, see "Setting up and maintaining security" in the System and Application Setup Help. Be set up and configured to submit messages on behalf of Microsoft Dynamics AX external endpoints. Ensure that the information about the SourceEndpointUser (specified for inbound transfers in clear text in the message header) is accurate and cannot be changed by the external endpoint. Verify that the request message or inbound document was submitted by the authorized user, and not by an attacker using "spoofing" to impersonate the authorized user. The trusted intermediary system must authenticate the submitting user. If the user is not authenticated then the request must be rejected by the trusted intermediary. 90
Microsoft Dynamics AX
Be aware that all actions involving inbound documents are executed within Microsoft Dynamics AX under the context of a valid Microsoft Dynamics AX user. If a DestinationEndpoint is provided in the message, then the SourceEndpointUser must be a valid Microsoft Dynamics AX user. If no DestinationEndpoint is provided in the message, then AIF will use the default endpoint. Associate AIF endpoints only with trusted Microsoft Dynamics AX users. Currently AIF does not authenticate the actual endpoint identification. Instead, it authenticates the user associated with the endpoint. Only users specifically configured on the endpoint are allowed to perform actions associated with the endpoint. Be sure to secure the file system location where you export messages from the Queue manager form. These messages could contain confidential information To restrict an endpoint to sending or receiving data only for specific customers, vendors, or warehouses and avoid spoofing attacks, use endpoint constraints.
91
Microsoft Dynamics AX Add external components only from a trusted and reliable source, for example, a Microsoft Partner or independent software vendor (ISV). External components include pipeline components (X++ classes called by AIF pipeline processing), document classes, and adapter classes. Before adding an XSLT as part of pipeline processing, ensure that the XSLT is secure and capable of handling documents with incorrect or malicious data. Thoroughly test any transformations to ensure that they do not contain code that will run and create an error on the system that can be exploited. By default, scripting is disabled on the XSLT transform component. If scripting is turned on, this can open up your system to scripting attacks. To check whether scripting is enabled: a. Click Basic > Setup > Application Integration Framework > Endpoints. b. Click Action policies. c. In the Endpoint Action Policies form, select an action, and then click Inbound Pipeline or Outbound Pipeline.
d. In the Pipeline components form, select a transformation or value substitution record, and then click Configure. e. In the Pipeline XSLT transform form, the Scripting enabled field should be cleared.
See Also
Configuring document exchanges with adapters Configuring document exchanges with Web services
92
Microsoft Dynamics AX
Note: This figure contains an example of application-to-application integration in which all the systems are trusted users on an intranet. If the clients were outside the intranet, there would be a trusted intermediary (such as BizTalk Server or electronic data interchange (EDI) services) in between the client and AIF. For more information about trusted intermediaries, see Security considerations for AIF. In the preceding illustration, the Web services authentication process is as follows: 1. The client calls a service method, such as the Customer.read method, and passes the entity key of the requested customer in a SOAP message. 2. The request is received by IIS where the AIF services are hosted. IIS retrieves the user credentials, depending on the authentication mechanism specified in the service configuration. IIS then tries to map the security credentials onto a valid domain user. By default, Microsoft Dynamics AX configures WCF to use the basicHttpBinding binding with
93
Microsoft Dynamics AX message security so the user credentials are contained in the message SOAP header. IIS authenticates the user as a valid user in Active Directory. 3. The request is then passed to AIF which performs further authentication by verifying that the user: a. Is a valid Microsoft Dynamics AX user b. Has access to the service through the appropriate security key 4. After AIF determines that the user has access to the service, the message is processed. At run time, standard AIF security ensures that the user has access to the data exposed by the service.
94
Microsoft Dynamics AX
Troubleshoot AIF
This topic describes how to troubleshoot common issues with document exchange using the Application Integration Framework (AIF). For more information about troubleshooting AIF Web services installation, see "Troubleshooting AIF Web services installation" in the Microsoft Dynamics AX Installation Guide.
95
Microsoft Dynamics AX
96
Microsoft Dynamics AX
97
Microsoft Dynamics AX For inbound messages, if there is a message in the Exception Log that states "The user is not authorized to perform this action", check the Queue manager form for any inbound messages in an error state by clicking Basic > Periodic > Application Integration Framework > Queue manager. If the Submitting user field on the Details tab is blank, verify that either the inbound queue's Authenticated property is selected or that all incoming messages are signed and authenticated.
Error received processing a message with Web services or the BizTalk adapter
While processing a message using Web services or the BizTalk adapter, you may see the error "The requested operation cannot be performed because the required security key doesn't exist." This error may occur if the user has not been granted execute permissions on the Business Connector security key. For more information about setting permissions, see "Manage security permissions for user groups and domain combinations" in the System and Application Setup Help.
98
Microsoft Dynamics AX
Although each of these processes is separate, they are interrelated, as shown in the following diagram. The process that is relevant for a particular company for any given data exchange depends on whether that company is the customer or the supplier. The orders-to-cash and procure-to-pay process and the AIF documents that support it
The orders-to-cash and procure-to-pay processes describe the full sales life cycle for both the customer and the supplier. The ability to integrate Microsoft Dynamics AX in these processes means that the entire sales life cycle can be automated. This automation translates into the ability for customers to order and receive merchandise quickly and for suppliers to ship merchandise and receive payment with fewer delays. Another advantage to full automation is the ability for the customer and supplier to provide each other with timely status updates at any point in the process.
99
Microsoft Dynamics AX
Direction
Description
Outbound
The customer sends the RFQ to selected suppliers to request a quotation. The supplier receives the customer RFQ as a sales quotation from the customer for evaluation. The supplier must now evaluate and approve the quotation before sending it back. After evaluating and editing the quotation, the supplier sends AxdCustQuotation to the customer as a legally binding quotation. This document is mirrored in AxdRFQReply, which is the legally binding quotation received by the customer.
Sales quotation
AxdSalesQuotation
Inbound
Sales quotation
AxdCustQuotation
Outbound
AxdRFQReply
Inbound
The legally binding quotation is received by the customer as an RFQ reply. If the quotation is accepted, the customer can issue a purchase order. The supplier sends a compiled price list to a customer. The price list is based on the trade agreements and discounts for the specific customer. The customer receives a price discount agreement document that contains pricing and discount information. It is exchanged with customers, suppliers, and other business partners. 100
AxdPriceList
Outbound
Price discount
AxdPriceDiscountJournal
Inbound
Microsoft Dynamics AX
Business entity Document name
AxdPurchaseRequisition
Direction
Description
Purchase order
Outbound
The customer sends a purchase requisition to a vendor. This document is mirrored in the inbound sales order document. A new sales order record is created in the supplier's database. After it is posted, the sales order can be sent back to the customer for viewing. This document is sent to the customer when the sales order is created by the supplier. The confirmation contains information such as prices, quantities, and delivery time. This document is sent to the customer when the sales order is updated with packing-slip information. The supplier sends an invoice to a customer. The invoice is based on the customer's sales order data. This document can also serve as a credit note. The customer creates a purchase invoice that is based on the associated purchase order. Received invoices are placed in the invoice register, where they are manually processed. The supplier sends a free text invoice to the customer. Items on the free text invoice are billed for but are not listed as inventory items. This document has significantly fewer restrictions on input data than the sales invoice document. The free text invoice does not include inventory transactions and can also serve as credit note. 101
Sales order
AxdSalesOrder
Inbound Outbound
Sales confirmation
AxdSalesConfirmation
Outbound
AxdASN
Outbound
Sales invoice
AxdSalesInvoice
Outbound
Inbound
AxdFreeTextInvoice
Outbound
Microsoft Dynamics AX
Business entity Document name
AxdReturnOrderAcknowled gment
Direction
Description
Outbound
The supplier sends an acknowledgment to the customer that a returned item has been received but not yet processed. This document follows the returned item and contains comments about repair, testing, and so on. The document can be sent to the customer, to the supplier, or to another partner.
AxdReturnOrderDocument
Inbound Outbound
Prerequisites
Before data can be exchanged electronically between a customer and a supplier in the procureto-pay process, the administrator must set up AIF. The supplier must be set up as an endpoint with the appropriate security, and the documents required to support the process must be enabled. For more information about how to set up AIF, see Exchanging documents electronically using AIF, Web services-based exchanges, and Adapter-based exchanges. In addition, the batch jobs must be set up so that when the purchasing agent sends the RFQ, it is sent to the selected vendors automatically. For more information about how to send documents electronically, see "Sending and receiving documents electronically" in the Application and Business Processes Help.
102
Microsoft Dynamics AX
Process overview
The procure-to-pay process includes these steps: 1. Identify and select a supplier. 2. Send and manage purchase orders. 3. Receive products. 4. Authorize and send payments. 5. Process product returns, if necessary. An RFQ is sent out by a customer to one or more suppliers to request the best price and delivery time for products. The customer's purchasing agent follows these procedures to identify and select a supplier.
Supplier's response
In response to the customer's RFQ, the supplier edits a sales quote to give the customer information on delivery time, pricing, discounts, and any other terms included in the quote. The RFQ is now a legally binding sales quotation from the supplier to the customer. The supplier uses the outbound sales quotation document ( AxdCustomerQuotation) to send a sales quotation. Before the customer receives this information, AIF must be configured to map the data in the sales quotation to an inbound RFQ reply ( AxdRFQReply). This can be done by using a pipeline transformation or with middleware such as BizTalk. Therefore, the customer sales quote from a supplier enters the customer's system as an RFQ reply.
103
Microsoft Dynamics AX
Supplier's response
After the customer selects a supplier, the supplier sends pricing information. In addition to regular pricing, a supplier may offer a discount price for certain items. The supplier can put conditions on the discount, such as a date range in which the discount is valid or for a particular quantity of items. From the customer perspective, all pricing information is contained in a price/discount agreement journal. The supplier uses the outbound price list agreement (AxdPriceList) to send a price list. Before the customer receives this information, AIF must be configured to map the data in the price list to an inbound price/discount journal (AxdPriceDiscountJournal). This can be done by using a pipeline transformation or by using middleware such as BizTalk. Therefore, the price list from a supplier enters the customer's system as a price/discount agreement journal.
104
Microsoft Dynamics AX
Prerequisites
Before data can be exchanged electronically between a supplier and a customer in the orders-tocash process, the administrator must set up AIF. The customer must be set up as an endpoint with the appropriate security, and the documents required to support the process must be enabled. For more information about how to set up AIF, see Exchanging documents electronically using AIF, Web services-based exchanges, and Adapter-based exchanges. In addition, the batch jobs must be set up so that when the account manager sends a sales quotation, it is sent to the customer automatically. For more information about how to send documents electronically, see "Sending and receiving documents electronically" in the Application and Business Processes Help.
Process overview
The orders-to-cash process includes these steps: 1. Process a request for quote (RFQ) and send pricing information. 2. Receive, enter, and validate orders. 3. Schedule deliveries and manage backordered merchandise. 4. Route shipments. 5. Send invoices and collect payment from the customer. 6. Manage returns and authorize credit notes, if necessary. An RFQ is sent out by a customer to one or more suppliers to request the best price and delivery time for products. The supplier's account manager receives an RFQ from the purchasing agent and follows these procedures to process the RFQ and send pricing information.
105
Microsoft Dynamics AX
106
Microsoft Dynamics AX
Adapter-based exchanges
A transport adapter is a software component that enables data to be exchanged asynchronously in Application Integration Framework (AIF). An asynchronous exchange is one in which documents are placed in a queue to wait for processing by different transport mechanisms. The transport adapters that are included with Microsoft Dynamics AX include: Microsoft Message Queuing (MSMQ) - Messages are sent and received through Message Queuing queues. File system - Messages are sent and received through file system directories. BizTalk Server - Messages are sent and received through BizTalk orchestrations.
For example, you may have a scenario where the chart of accounts is sent from Microsoft Dynamics AX to two external systems. The first system receives messages by checking a specific file system directory for files while the second system uses Microsoft Message Queuing (MSMQ) to receive messages. In this case, whether the chart of accounts is sent to the first system or the second system, both messages are first placed in the queue in Microsoft Dynamics AX. For more information about how to configure a data exchange using adapters, see Configuring document exchanges with adapters. To start and stop processing in the queues, use the Microsoft Dynamics AX batch functionality. For more information, see Start and stop the asynchronous AIF services. In the previous scenario, when the batch jobs start, they will pick up the messages in the queue. The batch jobs will send the first message to the appropriate directory and send the second message to the appropriate Message Queuing queue. How the messages are processed is defined by how the endpoint is configured and how the channel for that endpoint is configured.
AIF performance
When data is transferred in Application Integration Framework (AIF) using one of the adapters as the transport, messages move in and out of the system through the Microsoft Dynamics AX queue. This queue is known as the gateway queue. When using asynchronous adapters, some implementations may experience a performance impact when there is a high volume of messages sent to or from a particular endpoint. This performance impact is only experienced with asynchronous processing.
107
Microsoft Dynamics AX Moving messages out of the gateway queue and invoking business logic to process the messages is sequential by default. That is, for each AIF destination endpoint, only one message can be processed at any given time. The transition of the message from the gateway queue and calling business logic can be a potential performance bottleneck. Even with multiple AOSes, all messages bound for the same endpoint are processed from the gateway queue sequentially, even if this processing order is not necessary from a business process perspective. The conceptual message path for an inbound message
108
Microsoft Dynamics AX
Improve performance
To improve performance for data exchange using asynchronous adapters, AIF supports parallelism. Parallelism specifies that inbound messages are processed by one or more AOSes without regard to the order in which they are received or produced. This enables you to scale out message processing by adding multiple AOSes. Note that you can enable parallelism only for inbound channels. Enable parallelism Parallel processing in AIF is implemented on a per channel basis. Follow these steps to implement parallel processing. 1. Click Basic > Setup > Application Integration Framework > Channels. 2. Select a channel and select the Parallel processing check box. Conversational parallelism Conversational parallelismalso known as ordered parallelismmeans that you can specify certain messages to be processed sequentially in a channel even when parallelism is enabled for that channel. This is done by including a special XML element called <ConversationId> in the messages that require sequential processing. All messages with the same ConversationId will then be processed sequentially. For more information about this message header element, see "Document Schema Overview" and "Message Header" in the Microsoft Dynamics AX SDK Help. Note: If you do not select the Parallel processing field in the Channels form, all inbound messages for a particular endpoint will be processed sequentially and the <ConversationId> element in a message is ignored. Number of messages processed in parallel When you enable parallelism, the number of messages processed in parallel by the AOS is set to 1000 by default. Inbound messages that contain a ConversationId element value are processed sequentially and not in parallel. The MaximumInboundParallelMessages macro defines the number of inbound messages that are processed in parallel. The MaximumOutboundParallelMessages macro defines the number of outbound messages that are processed in parallel. You can change this number in the AIF macro in the AOT. You will need a developer license to access the AOT. To change the number of message processed in parallel, follow these steps. 1. Open the AOT and expand the Macros node. 2. Double-click the Aif macro to open it. 3. Find the following macro values and modify the number of messages according to your performance requirements.
#define.MaximumInboundParallelMessages #define.MaximumOutboundParallelMessages (1000) (1000)
109
Microsoft Dynamics AX
Prerequisites
When you configure a document exchange that uses an adapter, you must first perform these tasks to configure the transport mechanism that you are using: For exchanges that use the file system, see Configure the file system for AIF. For exchanges that use Message Queuing, see Configure Message Queuing for AIF. For exchanges that use BizTalk, see Configure BizTalk for AIF.
110
Microsoft Dynamics AX Extended configuration The extended configuration provides more flexibility and options for configuring the AIF components that make up the document exchange. This configuration allows you to create your own endpoints, configure actions for those endpoints, and specify endpoint action data policies. To set up a document exchange with the extended configuration, perform the following steps: 1. Create a local endpoint. See Create and configure local endpoints. This step is required if you are going to create an endpoint in a subsequent step. 2. Configure an adapter. In this step, you specify which transport adapter the data transfer uses: file system, Message Queuing, or BizTalk. See Configure an adapter. This step is required. 3. Create a channel. In this step, you specify the transport details for the exchange. See Creating and configuring channels and Create a channel. This step is required. 4. Enable the service. After you enable the service, the service operations (actions) are available for use by the endpoint. See Configure services. This step is required. 5. Create and configure an endpoint for the external system. This is only necessary if you do not use the default endpoint that ships in AIF. See Creating and configuring endpoints. This step is required if you are not going to use the default endpoint. 6. Configure the endpoint action policy to associate the desired actions with the endpoint. See Configure endpoint action policies. This step is required if you are not going to use the default endpoint. 7. For inbound transfers, create the XML message and place it in the appropriate location as defined the channel. This step is required. 8. Configure the Microsoft Dynamics AX batch jobs to send and receive messages. For inbound transfers, these jobs move messages from external locations (the file system, the Message Queuing queue, or BizTalk Server) into the internal queues and then save the data into the Microsoft Dynamics AX database. For outbound transfers, these jobs move messages into the internal queues and then to the external locations (the file system, the Message Queuing queue, or BizTalk Server). See Start and stop the asynchronous AIF services. This step is required.
111
Microsoft Dynamics AX Use the Pipeline components form to configure optional document transformations, including XSLT style sheet mapping or value substitutions. For more information, see Creating and configuring a pipeline. Use the Value Mapping form to set up optional predefined value mapping that is available for certain documents. For more information, see About value mapping.
See Also
Adapter-based exchanges
Change the default owner for objects for an inbound file system transfer
When you use the file system for an inbound transfer, the default owner of objects in the inbound folder must be the user who is sending the files. AIF determines user validity by comparing the sending user to the endpoint users. This ensures that a file is owned by the user who sends it, and not by the Administrators group that the user belongs to. 1. Click Start > Programs > Administrative Tools > Local Security Policy. 2. In the console tree, click Local Policies, and then click Security Options. 3. In the details pane, double-click System Objects: Default owner for objects created by members of the administrator's group, and then change the owner from Administrator's group to Object creator. 4. Log off from the computer, and then log on.
112
Microsoft Dynamics AX
See Also
Configuring document exchanges with adapters Configuring document exchanges with Web services Creating and configuring channels Configure an adapter
113
Microsoft Dynamics AX
Signed messages
If you need to send signed messages, such as to other Microsoft Dynamics AX installations, you must run the AOS service under a domain account. By default, the AOS service runs under the Network Service account. Using the default service account can be an issue when you use AIF because when the AOS is running as Network Service, it cannot send signed messages. For more information, see "Install an Application Object Server (AOS) instance" in the Microsoft Dynamics AX Installation Guide. When you send a signed message, AIF validates that the sending user is a current user in the Active Directory directory service. The Network Service account is not in Active Directory so the message signing process will fail. Microsoft Dynamics AX requires that incoming messages be signed. Therefore, if you want to send documents from one Microsoft Dynamics AX installation to another, the messages must be signed. If the receiver of the documents does not require a signature, you can send documents unsigned as long as the AOS runs under the Network Service account. The rules for message signature and the AOS account are as follows: Unsigned messages can be sent whether the AOS is running as the Network Service account or a domain user. Signed messages can only be sent if the AOS is running as a domain user.
114
Microsoft Dynamics AX 3. Click Details. 4. Select Message Queuing. 5. Click Details. 6. Select Active Directory Integration and Common. 7. Click OK twice. 8. Click Next to install.
Create a queue
A queue for inbound messages can be either private or public. A queue for outbound messages must be public. 1. Click Start > Settings > Control Panel > Administrative Tools > Computer Management. 2. Under Services and Applications, expand the Message Queuing folder. 3. To create a new public queue, right-click the Public Queues folder and then click New > Public Queue. 4. To create a new private queue, right-click the Private Queues folder and then click New > Private Queue. Any queue used for receiving messages must be located on the same computer as the AOS that is configured to run the batch jobs that operate on the AIF queues. For more information, see Start and stop the asynchronous AIF services. 5. Enter a name for the queue. 6. Click the Transactional check box. 7. Click OK.
115
Microsoft Dynamics AX 5. On the Security tab, set the access control lists (ACL) appropriately for all queues. When configuring the ACLs for newly created Message Queuing queues, be sure that the current, logged-in user retains Full Control over each queue. If the current, logged-in user is denied certain privileges, they may become locked out of the queue and unable to make changes. By default, Everyone and Anonymous Logon users can send messages to any newly created queue. Only the creator of the queue and an administrator can receive messages from the queues. For inbound queues, select Allow on Receive Message and Peek Message for the AOS account (the domain account or Network Service account associated with the AOS instance). Select Allow on Send Message, Get Properties, and Get Permissions for endpoint users only. For more information about how to configure endpoint users and trusted intermediaries, see Configure an endpoint. For outbound queues, set the ACLs to select Allow on Send Message, Get Properties, and Get Permissions for the Anonymous Logon user. Select Allow on Receive Message and Peek Message for endpoint users only. If the inbound queue is not on the same computer as the AOS, then two additional entries added to the queue's ACL. First, add the account for the AOS computer (for example, domain-name\computer-name$), and select Allow on Peek Message and Receive Message. Second, grant the Peek Message and Receive Message permissions for the Anonymous Logon user. 6. On the Security tab, click Advanced. 7. On the Owner tab, set the Current owner of this item: field to be the logged-in user who performs the document exchange. 8. Click OK to exit the menus. 9. Log off and then log back on to the computer.
See Also
Configuring document exchanges with adapters Configuring document exchanges with Web services
116
Microsoft Dynamics AX
117
Microsoft Dynamics AX Check for prerequisites The following software must be installed to enable a BizTalk document exchange in Microsoft Dynamics AX: Microsoft BizTalk Server 2006. For more information on installing BizTalk, download the BizTalk Installation Guide. Visual Studio 2005. This is used to create the BizTalk orchestration that communicates with AIF. A core Microsoft Dynamics AX installation. This installation must be completed before you install the BizTalk adapter. Active Directory directory service configured in native mode.
Set up the Business Connector proxy The Business Connector proxy is a Microsoft Windows domain account that is used to connect to Microsoft Dynamics AX for applications that require act-on-behalf-of functionality for external users or users who have an intermittent network connection. The Business Connector proxy account should not be set up as a Microsoft Dynamics AX user account. If you have already set up the Business Connector proxy account, you do not need to set it up again. To set up the Business Connector proxy account, see "Install the .NET Business Connector" in the Microsoft Dynamics AX Installation Guide. Install the BizTalk adapter The BizTalk adapter is installed on the application integration server. For more information on installing the BizTalk adapter, see "Install the BizTalk adapter" in the Microsoft Dynamics AX Installation Guide. Enable the BizTalk adapter 1. Click Basic > Setup > Application Integration Framework > Transport adapters. 2. Press CTRL+N. 3. In the Adapter class list, select AifBizTalkAdapter. There may be a slight delay while Microsoft Dynamics AX scans for adapters. 4. Type a name for the adapter in the Name field. 5. To make the adapter available for use in a channel, click Active. 6. Close the form. Configure a channel to use the BizTalk adapter 1. Click Basic > Setup > Application Integration Framework > Channels. 2. Press CTRL+N to create a new channel.
118
Microsoft Dynamics AX 3. Select AifBizTalkAdapter in the Adapter field. 4. Enter the unique identification information for the new channel, including an identifier in the Channel ID field and a friendly name in the Name field. 5. To activate the channel and allow it to participate in document exchanges, click Active. 6. The Direction field defaults to Both specifying that this channel can be used to send or receive messages. This field cannot be updated. 7. In the Address field, enter the name of the BizTalk group that contains the servers with which the adapter communicates. This group name does not need to correspond to a BizTalk group name; however, if all your servers are in the same BizTalk group, you may want the AIF group to match the BizTalk group for convenience. 8. Click Configure. 9. Enter the name of the BizTalk server that can connect to this channel. This is the machine name of the BizTalk server. You can enter multiple BizTalk servers in the grid and associate them with the new channel. Press CTRL+N to add each server to the list. 10. Press CTRL+S to save the channel. Next steps After you configure AIF for use with BizTalk, you must: Create the BizTalk assembly in Visual Studio. For more information, see How to: Create the BizTalk assembly. Configure document exchanges. For more information, see Configuring document exchanges with adapters.
For more information about configuring a document exchange with BizTalk, see the white paper Configure AIF BizTalk Adapter for Data Exchange.
119
Microsoft Dynamics AX Create the BizTalk assembly Create the BizTalk application in Visual Studio 2005. 1. Open Microsoft Visual Studio 2005 and click File > New > Project. 2. Under Project types, click the BizTalk Projects node. 3. Select Empty BizTalk Server Project. 4. In the Name field, enter a name for the BizTalk project. 5. In the Location field, enter a directory location for the project. 6. In the Solution Name field, keep the default solution. You can enter an alternate name if you want the solution name to be different from the project name. 7. Click OK. Add a reference to the AIF schemas Add a reference to the Microsoft Dynamics AX schemas assembly from the BizTalk project. A reference to this assembly enables you to import a schema for a particular document. 1. In the Visual Studio 2005 Solution Explorer, right-click the References node and select Add Reference. 2. Click the Browse tab. 3. Browse to the Microsoft Dynamics AX install location of <Microsoft Dynamics AX Installation Directory>\Client\Bin\ Microsoft.Dynamics.BizTalk.Adapter.Schemas.dll. 4. Double-click the assembly (.dll file). It will appear in the Selected projects and components grid. 5. Click OK. The assembly reference appears under the References node in the Visual Studio Solution Explorer. Import the schemas After a reference to the AIF document schemas has been created, you must import the document schemas. In these steps, you will select the appropriate schema for each action based on whether the exchange is inbound or outbound and whether it is synchronous or asynchronous. 1. In the Visual Studio 2005 Solution Explorer, right-click the project and select Add > Add Generated Items. 2. Under Categories, the Add Adapter Metadata node should be selected. In the Templates pane, select Add Adapter Metadata. 3. Click Add. The Add Adapter Wizard appears. 4. Select the Microsoft Dynamics AX 2009 adapter and click Next. 5. In the Server name field, enter the name of the server running the AOS. The name entered in this field should be the machine name of the server.
120
Microsoft Dynamics AX 6. In the TCP/IP Port field, enter the port of the AOS server and click Next. To find the server port, open the Microsoft Dynamics AX 2009 Server Configuration Utility by clicking Start > Administrative Tools > Microsoft Dynamics AX 2009 Server Configuration Utility. Select a configuration in the Configuration field to find the port number in the TCP/IP port field in the Settings frame. 7. In the Schema Import Wizard, you will see a list of the document schemas for document services that are enabled in AIF. For example, if you have enabled the sales order service, you will see it listed as SalesOrderService. Expand the service node and select the actions for which you want to import schemas. Note: In order to import document service schemas into a BizTalk project, you must have at least one service enabled in Microsoft Dynamics AX. 8. Click Finish. The schemas for the selected documents can be seen in the Solution Explorer (.xsd file). An orchestration has also been created. Select the message schema For each message type that will be processed in the orchestration, you must specify the schema in the multi-part messages types property. 1. In Solution Explorer, double-click the orchestration (.odx file) to open it. 2. In the Orchestration View, expand the Types node and then expand the Multi-part Message Types node. There will be a node for each schema imported, for example, SalesOrderService_create_Request, SalesOrderServer_create_Response, and so on. 3. Expand each of the child nodes, click the Body node, and open the Type property drop-down list. 4. In the drop-down list, expand the Schemas node and click Select from referenced assembly. The Select Artifact Type dialog box appears. 5. Expand the Microsoft.Dynamics.BizTalk.Adapter.Schemas node and click the { } DynamicsAx5 node 6. In the Type Name field, select the corresponding schema type, for example, EntityKey, and click OK.
Microsoft Dynamics AX
You should change the maximum locking interval after monitoring the volume of exchanges for your particular system. For adapter-based exchanges, AIF implements a scheme for locking endpoints and channels to guarantee that messages are processed in a particular order. After one of the AIF services (AifInboundProcessingService, AifOutboundProcessingService, GatewaySendService, and GatewayReceiveService) begins processing messages related to a channel or an endpoint, a lock is set for that resource. If the service stops processing the resource before all messages have been transferred, the lock on the resource expires after the maximum locking interval, and another service can begin processing that resource. For more information about the AIF batch services, see Start and stop the asynchronous AIF services. The default value for the maximum resource locking interval is 30 minutes. If your installation only runs one instance of the AIF services, and those services are interrupted while processing channels or endpoints, the maximum time before the services can begin processing again is 30 minutes.
122
Microsoft Dynamics AX However, if you are exchanging documents using more than one channel or more than one endpoint and you use multiple AOS instances installed on multiple computers, you may need to set the maximum locking interval for channels and endpoints. 1. Click Basic > Setup > Application Integration Framework > Global settings. 2. Enter the time in minutes in the Maximum resource locking interval (minutes) field. 3. Press CTRL+S to save.
123
Microsoft Dynamics AX
See Also
Configuring document exchanges with adapters Configuring document exchanges with Web services
A ServiceOperation action defines an action that is available from a service. A SendXML action defines an action that is independent of any service or class and is used in X++ to send XML (outbound). The Actions form displays all of the actions that are available.
124
Microsoft Dynamics AX
ServiceOperation Actions
The services that ship with Microsoft Dynamics AX come with one or more of the actions in the following table. These actions are ServiceOperation actions and are read-only in the Actions form.
Service operation
create
Description
Accepts XML data, writes a record to the database, and returns the ID of the new record. Accepts ID values and deletes the associated records. Accepts query criteria and returns the matching data. Accepts query criteria and returns IDs of the matching data. Accepts a list of IDs and returns the associated data. Accepts a list of IDs and data and updates the associated records in the database.
Each service does not implement all of the available actions. Rather, each service implements actions based on the requirements of the business process that the service supports. Follow these steps for more information about the service operations that are supported by a service: 1. Click Basic > Setup > Application Integration Framework > Services 2. Select a service and click > Service Operations. The Service Operations form lists all of the available operations. 3. To view the parameters for a service operation, select the operation and click Parameter schema.
125
Microsoft Dynamics AX
Delete a SendXML action 1. Click Basic > Setup > Application Integration Framework > Actions. 2. Select an action and click ALT+F9. Note: You should ensure that an action is not used in an action policy for any endpoints before deleting the action.
126
Microsoft Dynamics AX
Configure an adapter
Adapters are the software components that enable document exchange by communicating with specific transport mechanisms. Microsoft Dynamics AX ships with adapters for the following transports: File system (AifFileSystemAdapter) Microsoft Message Queuing (AifMSMQAdapter) BizTalk Server (AifBizTalkAdapter)
AIF uses these adapters to exchange data with external systems via the specific transport. Therefore, if you implement an exchange with an external system that is required to use BizTalk, you must set up the exchange to use the BizTalk adapter. AIF also provides the ability for developers to create custom adapters for your own specific needs. After a custom adapter has been created (coded), you add it to the list of available adapters and enable it. Then you create and configure a new channel to use the new adapter. Note that an adapter can only be deleted if it has no corresponding channels.
Configure an adapter
Follow these steps to configure a transport adapter. 1. Click Basic > Setup > Application Integration Framework > Transport adapters. 2. Select the adapter that you want to use from the Adapter class field. There may be a slight delay while Microsoft Dynamics AX scans for adapters. 3. Type a name for the adapter in the Name field. 4. Click Active to make the adapter available for use in a channel. 5. If the adapter has been implemented as unidirectional, on the General tab, select a direction (inbound or outbound) for the adapter. If the adapter is not set to unidirectional, the direction for the adapter appears as it has been implemented and you cannot change it. 6. The Hosted check box indicates whether the adapter is hosted. A hosted adapter uses the gateway queue to send and receive message, for example the file system and MSMQ adapters. An adapter that is isolated is external to the AIF gateway service and is implemented so that it controls the sending or receiving of messages. The BizTalk adapter does not use the gateway queue to send and receive messages.
For more information about the AIF gateway service, see Start and stop the asynchronous AIF services.
See Also
Configuring document exchanges with adapters Start and stop the asynchronous AIF services Server and Database Administration Guide 127
Microsoft Dynamics AX
These adapters are available for channel configuration without any customization of your installation. For more information about how to create a channel, see Create a channel.
See Also
Configuring document exchanges with adapters
Create a channel
Channels define the transport method and transport address that enable messages to move in and out of the framework to reach the endpoint. Before configuring a channel, you must have activated an adapter on the Transport adapters form. For more information, see Configure an adapter. Create a channel to use the file system adapter 1. Click Basic > Setup > Application Integration Framework > Channels. 2. Press CTRL+N to create a new channel. 3. Enter the identification information for the new channel, including a unique identifier in the Channel ID field and a friendly name in the Name field. 4. Select File System Adapter in the Adapter field. Note: You must first have activated the file system adapter on the Transport adapters form before it appears in the list of available adapters.
128
Microsoft Dynamics AX 5. Click Active to activate the channel and allow it to participate in document exchanges. 6. Select from the available directions for the transfers to be performed in this channel (Inbound, Outbound, or Both). The list of available directions depends on the adapter. 7. If you have selected a direction of Inbound, select Parallel processing to enable inbound messages for this channel to be processed in parallel by multiple AOSes. This means that messages are processed without regard to the order in which they are received or produced. For more information, see AIF performance. When this field is cleared, messages for this channel will be processed sequentially. 8. In the Address field, select a directory (file folder) for the channel to use. You can select an existing directory or you can make a new directory by clicking Make New Folder. 9. On the General tab, set the Maximum batch size to the maximum number of messages to be processed at one time from the queues. Note: You can select Unlimited if you do not want to limit this number. 10. If the direction is set to Inbound, you can select a response channel. The response channel is used to respond back to the source endpoint with verification results or error responses to inbound transfers. For example, if an external system sends a message that contains the sales order service read action and a sales order entity key to an endpoint, a document containing the sales order is sent back to the external system through the response channel of the channel that received the request. Create a channel to use the MSMQ adapter 1. Click Basic > Setup > Application Integration Framework > Channels. 2. Press CTRL+N to create a new channel. 3. Enter the identification information for the new channel, including a unique identifier in the Channel ID field and a friendly name in the Name field. 4. Select MSMQ Adapter in the Adapter field. Note: You must first have activated the MSMQ adapter on the Transport adapters form before it appears in the list of available adapters. 5. Click Active to activate the channel and allow it to participate in document exchanges. 6. Select from the available directions for the transfers to be performed in this channel (Inbound, Outbound, or Both). The list of available directions depends on the adapter. 7. If you have selected a direction of Inbound, select Parallel processing to enable inbound messages for this channel to be processed in parallel by multiple AOSes. This means that messages are processed without regard to the order in which they are received or produced. For more information, see AIF performance. When this field is cleared, messages for this channel will be processed sequentially.
129
Microsoft Dynamics AX 8. In the Address field, select an existing queue for the channel to use. Note: When creating the queue in Message Queuing, be sure to select the Transactional field; otherwise, the queue will not be available as a channel address. 9. On the General tab, set the Maximum batch size to the maximum number of messages to be processed at one time from the queues. Note: You can select Unlimited if you do not want to limit this number. 10. If the direction is set to Inbound, you can select a response channel. The response channel is used to respond back to the source endpoint with verification results or error responses to inbound transfers. For example, if an external system sends a message that contains the sales order service read action and a sales order entity key to an endpoint, a document containing the sales order is sent back to the external system through the response channel of the channel that received the request. Create a channel to use the BizTalk adapter 1. Click Basic > Setup > Application Integration Framework > Channels. 2. Press CTRL+N to create a new channel. 3. Enter the identification information for the new channel, including a unique identifier in the Channel ID field and a friendly name in the Name field. 4. Select File System Adapter in the Adapter field. Note: You must first have activated the file system adapter on the Transport adapters form before it appears in the list of available adapters. 5. Click Active to activate the channel and allow it to participate in document exchanges. 6. Select from the available directions for the transfers to be performed in this channel (Inbound, Outbound, or Both). The list of available directions depends on the adapter. 7. If you have selected a direction of Inbound, select Parallel processing to enable inbound messages for this channel to be processed in parallel by multiple AOSes. This means that messages are processed without regard to the order in which they are received or produced. For more information, see AIF performance. When this field is cleared, messages for this channel will be processed sequentially. 8. In the Address field, type the name of the BizTalk group to use. 9. On the General tab, set the Maximum batch size to the maximum number of messages to be processed at one time from the queues. Note: You can select Unlimited if you do not want to limit this number.
130
Microsoft Dynamics AX 10. Click Configure. 11. Enter the names of the computers running BizTalk Server that belong to the specified BizTalk group. Press CTRL+N to add each server to the list. Note: The Configure button is available depending on the type of adapter that you are using in the channel.
See Also
Configure the file system for AIF Configure Message Queuing for AIF Configure BizTalk for AIF Configure an adapter
131
Microsoft Dynamics AX Assign actions to an endpoint to restrict the types of data exchanges in which the endpoint can participate. Set data policies on an endpoint to restrict the data that can be retrieved or updated. Implement custom configuration requirements like XSLT transformations, value mapping, and custom pipeline components. Customize the message logging for each action associated with an endpoint.
Prerequisites Before you can create an endpoint, the following must already exist and be configured: A local endpoint. A named service operation for the exchange, for example, CustCustomerService.read. For more information, see Creating and configuring actions. Microsoft Dynamics AX users that will be associated with the endpoint. An outbound channel must be already be defined if needed.
Endpoint information When you configure an endpoint, you enter information about the following: Identifying information for the endpoint, including a unique identifier, a friendly name, the active status, error handling information, the associated channel, and the Microsoft Dynamics AX company identification. Constraints on the endpoint that restrict document exchange by defining valid Microsoft Dynamics AX customers, vendors, or warehouses. Microsoft Dynamics AX users and trusted intermediaries that are allowed to submit documents for the exchange. Endpoint action policies that relate actions to the endpoint. Pipeline components for any optional document transformations for the action related to the endpoint. Endpoint action data policies (also known as data policies) that define which fields in a document are allowed or required to participate in the exchange. Document configuration options, including value mapping. For more information, see About value mapping and "Set up external codes for AIF" in Applications and Business Processes.
Create an endpoint
Before you can create an endpoint, the following must already exist and be configured: A local endpoint. An enabled service operation for the exchange, for example, CustCustomerService.read. For more information, see Creating and configuring actions. Microsoft Dynamics AX users that will be associated with the endpoint. An outbound channel must be already be defined if needed. 132
Microsoft Dynamics AX Create the endpoint 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Press CTRL+N to create a new endpoint. 3. In the Endpoint ID field, type a unique identifier for the endpoint. 4. In the Name field, type a friendly name. 5. Select Propagate errors to return detailed error messages to the endpoint. Note: By default, Microsoft Dynamics AX logs detailed errors and sends a generic error back to the endpoint. Enabling this field will send the detailed error to the endpoint and could be a potential security risk. Only select this field if it is acceptable to send detailed error information to an endpoint. 6. Do not select Intercompany organization unless the endpoint is to be used in an intercompany transfer. For more information about these transfers, see "Manage intercompany sales orders" or "Manage intercompany purchase orders" in the Application and Business Processes Help. 7. If you select Intercompany organization, then you must select a company in the Company field. 8. In the Outbound channel ID field, select an outbound channel. You must select a channel if the endpoint will be used in an adapter-based exchange and data is to be sent outbound from Microsoft Dynamics AX to the endpoint. If the endpoint is participating only in Web servicesbased exchanges, the outbound channel is not necessary. 9. In the Local endpoint ID field, select the identifier for the local endpoint (your system) that participates in the exchange with the endpoint that you are configuring. 10. In the Default encoding format field, select the encoding format for this endpoint. 11. On the Constraints tab, enter the data constraints for the endpoint to restrict the data that can be processed by the endpoint. To allow data to be exchanged regardless of any associations, click No constraints. For more information, see Configure an endpoint. After selecting, the No constraints check box becomes unavailable. However, if you add constraints later, the check box clears itself. 12. On the Overview tab, select Active to enable the endpoint to participate in data exchanges.
133
Microsoft Dynamics AX 13. On the Users tab, enter information to restrict users that are authorized to initiate transactions for the endpoint. In the User type field, select either User or User group. You can also designate trusted intermediaries on the Users tab. Trusted intermediaries are middleware applications that reside between external endpoints and Application Integration Framework (AIF), that is, they are Microsoft Dynamics AX users (or user groups) that are authorized to submit inbound requests on behalf of the endpoint. For more information about trusted intermediaries, see Security considerations for AIF. Notes: When configuring users on an endpoint, keep in mind that these Microsoft Dynamics AX users may represent outside interests and must have permissions set appropriately. For more information about configuring Microsoft Dynamics AX users, see "Setting up and maintaining security" in the Microsoft Dynamics AX Installation Guide and the following topics in the System and Application Setup Help: "Manage security permissions for user groups and domain combinations," "Manage user groups," and "Manage users." You must also set the appropriate security keys and record-level security for any users that are granted access to Microsoft Dynamics AX through AIF to help prevent unauthorized data access. For more information, see "Manage record level security" in the Application and Business Processes Help. Certain actions cause data to be written directly to the Microsoft Dynamics AX database without manual end-user verification (for example, creating exchange rates). When configuring endpoints and creating new actions, be especially careful to restrict access to trusted and reliable partners and applications.
14. Click Action policies to configure actions on the endpoint with the Endpoint Action Policies form. Examples of actions include the service operations read and create. For information on setting up action policies, see Configure endpoint action policies. 15. From the Endpoint Action Policies form you can select an action and click Data Policies to enter the data policy, that is, information about which fields are required and which are optional in the document to be exchanged. For details on setting up data policies, see Configure endpoint action data policies. 16. From the Endpoint Action Policies form, you can click Configure to perform documentspecific configuration, including value mapping. Value mapping is the translation of field data values based on business rules, for example, translating internal item numbers to vendorspecific item numbers or industry standard numbers depending on the trading partner. For more information, see Configure endpoint action data policies.
134
Microsoft Dynamics AX Enabled fields The fields that are enabled for an endpoint depend on the type of endpoint that you are configuring as shown in the following table.
Field Default endpoint Standard endpoint Intercompany endpoint
Endpoint ID
No
Yes (when adding new Yes (when adding new endpoint) endpoint) Yes Yes Yes Yes Yes Yes Yes Yes
Name Active Propagate errors Intercompany organization Company Outbound channel ID Local endpoint ID Default encoding format
No Yes Yes No
No No No No
Yes No No No
Troubleshooting trusted intermediary If you receive an error on an inbound message and it was submitted by a trusted intermediary, it may be due to the fact that the submitting user of the message and the user specified in the message SourceEndpointUser element are not in the same Microsoft Dynamics AX domain. The trusted intermediary is a valid Microsoft Dynamics AX user that is allowed to submit AIF messages. Typically, the trusted intermediary does not have access to the AIF services. The source endpoint user is a valid Microsoft Dynamics AX user that has access to the AIF services. If the user submitting the message (the trusted intermediary) is in a different domain than the source endpoint user, you may receive an error. To resolve this problem, give the source endpoint user open domain access permissions. To locate the security key for these permissions, use the following steps. 1. Open Administration > Setup > User groups. 2. Click Permissions.
135
Microsoft Dynamics AX 3. On the Permissions tab, expand the Administration node and select Open domain access. Note: This refers to Microsoft Dynamics AX domains and not Active Directory domains. Microsoft Dynamics AX domains are defined in Administration > Setup > Domains. For more information, see "Manage security permissions for user groups and domain combinations" in and "Manage domains" in the System and Application Setup Help.
Configure an endpoint
When you configure an endpoint, you enter information in the Endpoints form about the following: Identifying information for the endpoint, including a unique identifier, a friendly name, the active status, error handling information, the intercompany status, local endpoint, Microsoft Dynamics AX company identification for an intercompany exchange, outbound channel information, and encoding format for the transfer. Constraints on the endpoint that restrict document exchange by defining valid Microsoft Dynamics AX customers, vendors, or warehouses. Microsoft Dynamics AX users and trusted intermediaries that are allowed to submit documents for the exchange. Endpoint action policies that relate actions to the endpoint. Pipeline components for an action related to the endpoint. Endpoint action data policies that define which fields in a document are allowed or required for the exchange.
136
Microsoft Dynamics AX Available tabs In the Endpoints form, user interface tabs are available depending on what type of endpoint you select in the Overview tab.
Endpoint type Tabs enabled
Default endpoint
Specific endpoint
Default endpoint Microsoft Dynamics AX ships with a default endpoint that can be used to enable data exchanges as soon as services are generated. The default endpoint has minimal configuration options, and you cannot add any constraints or users to the default endpoint. By default, all actions are enabled for the default endpoint but you must still enable the service actions on the AIF Services form. You can change the following options on the default endpoint: In the Endpoints form, you can update the Active field and the Propagate errors field. For more information about these fields, see Create an endpoint. In the Endpoint Action Policies form, you can enable and configure actions. In the Endpoint action data policies form, you can define which fields are allowed or required in the data exchange. In the Pipeline components form, you can define data transformations for inbound or outbound exchanges. In the Parameter Schemas form, you can view the schema of the action parameters and the return value and optionally save them to an .xsd file. In the Value Mapping form, you can configure value mapping.
137
Microsoft Dynamics AX Configure endpoint identification 1. Click Basic > Setup > Application Integration Framework.> Endpoints. 2. Press CTRL+N to create a new endpoint, or select an existing endpoint from the list to be modified. 3. Enter the information for the endpoint on the General tab, including the unique endpoint identification information, the friendly name for the endpoint, the local endpoint ID, and the default encoding format. 4. Select Propagate errors to return detailed error messages to the endpoint. Note: By default, Microsoft Dynamics AX logs detailed errors and sends a generic error back to the endpoint. Enabling this field will send the detailed error to the endpoint. Only select this field if it is acceptable to send detailed error information to an endpoint. 5. For intercompany transfers, select Intercompany organization if the endpoint is a company within your Microsoft Dynamics AX installation, and select a company in the Company field. 6. Do not select Intercompany organization unless the endpoint is to be used in an intercompany transfer. For more information about these transfers, see "Manage intercompany sales orders" or "Manage intercompany purchase orders" in the Application and Business Processes Help. 7. Selecting an outbound channel is not required for all exchanges. However, if your Microsoft Dynamics AX installation is sending messages to this endpoint (for example, if you are configuring an outbound-only exchange), you must select a channel in the Outbound channel ID field. 8. In the Local endpoint ID field, select the local endpoint that participates in exchanges with this endpoint. Note: There may be more than one local endpoint configured for your Microsoft Dynamics AX installation. If that is the case, then make sure to select the correct local endpoint to participate in the exchange with the endpoint that you are configuring. 9. View the pre-populated setting for encoding format in the Default encoding format field. This setting defaults to the value set on the Integration Framework global settings form.
138
Microsoft Dynamics AX Configure constraints on an endpoint and activate the endpoint 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Press CTRL+N to create a new endpoint, or select an existing endpoint from the list to be modified. Note: You cannot add constraints to the default endpoint so the Constraints tab will not be enabled if the default endpoint is selected. 3. On the Constraints tab, select No constraints to clear the form and allow data to be exchanged regardless of any association. The No constraints check box becomes unavailable. However, if you add constraints later, the check box clears itself. 4. Press CTRL+N to create a new constraint. 5. Choose the Constraint type (Vendor, Customer, or Warehouse). 6. Select a Constraint ID from the list. The Name field is completed when you select the Constraint ID. 7. On the Overview tab, select Active to activate the endpoint. Messages flow through the framework from the local endpoint to and from any active endpoints. Configure users and trusted intermediaries for an endpoint You must enter information for at least one endpoint user or trusted intermediary who is authorized to initiate transactions for the endpoint on the Users tab. Notes: When configuring users on an endpoint, remember that these Microsoft Dynamics AX users may represent outside interests and must have permissions set appropriately. For more information about configuring Microsoft Dynamics AX users, see "Setting up and maintaining security" in the Microsoft Dynamics AX Installation Guide and the following topics in the System and Application Setup Help: "Manage security permissions for user groups and domain combinations," "Manage user groups," and "Manage users." You must also set the appropriate security keys and record-level security for any users that are granted access to Microsoft Dynamics AX through Application Integration Framework (AIF), to help prevent unauthorized data access. For more information, see "Manage record level security" in the Application and Business Processes Help. Certain actions cause data to be written directly to the Microsoft Dynamics AX database without manual end-user verification (for example, creating exchange rates). When configuring endpoints and creating new actions, be especially careful to restrict access to trusted and reliable partners or applications.
139
Microsoft Dynamics AX Configure an endpoint user 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Press CTRL+N to create a new endpoint, or select an existing endpoint from the list to be modified. Note: You cannot add users or user groups to the default endpoint so the Users tab will not be enabled if the default endpoint is selected. 3. Click the Users tab. 4. Under Endpoint users, in the User type field, select either User or User group. 5. In the Application user or group field, select a valid Microsoft Dynamics AX user or user group name. The Name field is filled in automatically. For more information about Microsoft Dynamics AX users and user groups, see "Setting up and maintaining security" in the System and Application Setup Help. Configure a trusted intermediary Trusted intermediaries are middleware applications that reside between external endpoints and AIF. That is, they are Microsoft Dynamics AX users (or user groups) that are authorized to submit inbound requests on behalf of the endpoint. A trusted intermediary prevents an unauthorized user from accessing AIF and is typically used in a business-to-business data exchange scenario. For more information about trusted intermediaries, see Security considerations for AIF. For more information about Microsoft Dynamics AX users and user groups, see "Setting up and maintaining security" in the System and Application Setup Help. 1. Under Trusted intermediaries, select Use trusted intermediary to enable a trusted intermediary for exchanges with this endpoint. Note: If the Use trusted intermediary box is checked, there must be at least one entry in the Trusted intermediaries grid. 2. Under Trusted intermediaries, in the User type field, also select either User or User group. 3. In the Application user or group field, select a valid Microsoft Dynamics AX user or user group name. The Name field is filled in automatically. Configure action policies, data policies, and pipeline components for an endpoint 1. After you have completed the preceding steps, click Action policies to configure actions on the endpoint. For more information about action policies, see Configure endpoint action policies. 2. Press CTRL+S to save the action policy.
140
Microsoft Dynamics AX 3. From the Endpoint Action Policies form, select an action, press CTRL+S, and click Data Policies to enter information about which fields are required and which are optional in the document to be exchanged. 4. Click Configure to perform document-specific configuration, including value mapping, for the document exchange. Value mapping is translation of field data values based on business rules, for example, translating internal item numbers to vendor-specific item numbers or industry standard numbers depending on the trading partner. For more information, see Configure endpoint action data policies. 5. Click Inbound Pipeline or Outbound Pipeline to configure the pipeline components for any custom transformations performed on the document. For more information, see Creating and configuring a pipeline. 6. Click Parameter schema to see a list of parameters and the return value for the selected action. On the Parameter Schemas form, click View schema to view the XML schema for the selected parameter or return value. On the Schema form, you can click Save as to save the schema as an .xsd file. Give the endpoint user access to Business Connector when using Web services When you configure an endpoint for Web services, you must configure an endpoint user and/or trusted intermediary, as outlined above. Next, you must give that Microsoft Dynamics AX user or user group access to the Business Connector. 1. Click Administration > Setup > User groups and select the user group for the endpoint, or the user group that contains the user for the endpoint. 2. Click Permissions. 3. On the Permissions tab, select Business Connector and then select Full control. 4. Click Cascade. Disable an endpoint To disable an endpoint, follow these steps. 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select an endpoint in the grid and clear the Active field. Important: For adapter-based exchanges, outbound messages are processed completely even when the endpoint is disabled during processing and a response may still be sent. To ensure that no data is sent from AIF when disabling an endpoint, first disable the batch processing jobs. Be sure that there are no outbound messages in the queue, disable the endpoint, and then restart the batch processing jobs.
141
Microsoft Dynamics AX
142
Microsoft Dynamics AX 6. You can change the status of an action associated with the endpoint to Enabled, Disabled, or Hold. Select Enabled to make the action active for this endpoint. Selecting Disabled has the same effect as if the action was not configured on the endpoint. Select Hold to prevent outbound documents from being passed to the adapter and inbound documents from being passed to the document class. If the action status is Hold, the document is held in the queue and may be examined and resubmitted. For more information, see Edit and resubmit messages in the queues. For a synchronous exchange such as a Web service, an error message is generated for the hold condition. In the External identifier override field, type an action identifier to override the External identifier field on the Actions form. Any messages referencing this endpoint and action must use the external identifier in the <Action> tag. 7. Select the Automatically respond to errors check box to send any errors that are encountered back to the caller. 8. Press CTRL+S to save.
To view the document history by message or by document, click Basic > Periodic > Application Integration Framework > Document history.
143
Microsoft Dynamics AX
Mandatory/required fields
There are two types of qualifiers for data fields on the Data Policies form: required and enabled. These have different meanings and effects depending on the direction of the transfer. Server and Database Administration Guide 144
Microsoft Dynamics AX If a data field is allowed to be included in an inbound exchange, it is said to be enabled. For inbound documents, only fields that are enabled are allowed to be submitted by the endpoint. If a document is received that includes fields that are not enabled, the document is rejected and an exception is logged. There are two terms that are used when discussing whether a field is required in a document: mandatory fields and required elements.
Term Location Description
Mandatory field
Database
Database field that has the Mandatory property set to Yes. Element required to be present in the XML document to satisfy the schema. Required elements often correspond to mandatory fields in the database. A database field that is mandatory but that can be defaulted does not have to be required in the XML document.
Required element
XML document
Note: For inbound documents, mandatory fields (that is, fields required by the Microsoft Dynamics AX database) should be set to Enabled and Required on the Data Policies form if they cannot be set by default in the database. For outbound documents, the fields to be sent must be set to Enabled.
145
Microsoft Dynamics AX The concept of required fields does not apply to outbound transfers. For outbound documents, only fields that are enabled are included in the exchange. Note: When you clear the Enabled check box for a field used for calculating the value of another field, you may also need to clear the Enabled check box for the calculated field, so that unauthorized users may not be able to deduce the value of the original field that is not enabled. For more information about the calculated fields available in each document, see "Standard Axd Documents" in the Microsoft Dynamics AX SDK Help.
146
Microsoft Dynamics AX 4. Select Enabled for each field to be included in the document transfer. Note: For an inbound document, fields that are enabled but not required are optional in the exchange. The concept of required fields does not apply to outbound transfers. Only fields for which you have selected the Enabled check box are sent in the transfer. 5. Click Set to clear or select all fields.
The AifValueSubstitutor pipeline component allows you to substitute one character string for another character string in a given field. This enables you to change field values (an item code, for example) in an inbound or outbound message to match the requirements of the system receiving the data. To apply XSLT document transformations, you must first import an XSLT style sheet into Microsoft Dynamics AX and then specify the AifXMLTransform pipeline component for the desired endpoint action policy. Prerequisites You can automatically configure pipeline components for actions that are associated with the default endpoint. Otherwise, before configuring any pipeline components, you must have the following: A local endpoint. For more information, see Create and configure local endpoints. An endpoint with an action policy and a data policy. For more information, see Configure an endpoint, Configure endpoint action policies, and Configure endpoint action data policies.
Create a pipeline 1. Click Basic > Setup > Application Integration Framework > Endpoints and select an endpoint. 2. Click Action policies and select an action. 3. Click Inbound Pipeline or Outbound Pipeline depending on whether you want the transformations to occur on inbound documents or outbound documents. Server and Database Administration Guide 147
Microsoft Dynamics AX 4. Press CTRL+N to create a new pipeline component entry. 5. Select a component in the Class name field. There may be a delay while the system scans the AOT for pipeline components. 6. In the Description field, type a description of the pipeline. 7. Press CTRL+S to save and enable the Configure button. 8. Each pipeline component has different configuration requirements, so you see a different form when you click Configure for any pipeline component. For more information, see Configure a pipeline.
Configure a pipeline
Configuring a pipeline for an action on an endpoint involves specifying the pipeline components for a transformation of the document, in execution order, on the Pipeline components form. You can define pipeline components for inbound or outbound actions separately. For more information about creating a pipeline, see Creating and configuring a pipeline. Two pipeline components are included with Microsoft Dynamics AX. You can configure these pipeline components to perform value substitution and XSLT transformations. Other custom pipeline components may be developed for your system by your team or outside consultants or partners. Configuration of any custom pipeline component depends entirely on the implementation of that component. The two pipeline components available with your Microsoft Dynamics AX installation are:
AifValueSubstitutor AifXMLTransform
You can include as many pipeline components as you need to transform the document to meet the needs of the exchange. Each pipeline component has different configuration requirements, so you see a different form when you click Configure for any pipeline component. Configure value substitution Before you can configure a value substitution pipeline, you must define lookup values. For more information, see About value lookups. 1. Click Basic > Setup > Application Integration Framework > Endpoints and select an endpoint. 2. Click Action policies and select an action. 3. Click Inbound Pipeline or Outbound Pipeline. 4. In the Class name field, select AifValueSubstitutor. If there is no pipeline, press CTRL+N to add a new pipeline. 5. Press CTRL+S to save. 6. Click Configure.
148
Microsoft Dynamics AX 7. On the Pipeline Value Substitution Parameter Selection form, select the parameter in the Parameter name field. 8. Click Configure value substitution to display the Pipeline value substitution form. 9. In the Lookup table ID field, select the lookup table identification for the value lookup table (that you entered on the Value lookup form) for the fields requiring value substitution. For more information about configuring value lookups, see About value lookups. Notes: Values for Lookup table ID are filtered by type. If no values are displayed for Lookup table ID, you may need to return to the Value lookup form and enter a value for Type on the General tab. On the Pipeline value substitution form, the following read-only fields appear: Element name - The name of the data field. XPath - Specifies where the data field fits into the schema hierarchy. Type - The Microsoft Dynamics AX data type.
Configure an XSLT transform To configure a transformation pipeline, you must first import the XSLT into the repository. Then you must create the transformation pipeline based on the XSLT. For more information about security best practices when implementing transformations, see Security considerations for AIF. Add an XSLT style sheet to the XSLT repository 1. Click Basic > Setup > Application Integration Framework > XSLT repository. 2. Click CTRL+N to create a new record. 3. In the XSLT ID field, enter a unique identifier for the XSLT transform. 4. In the Name field, enter a text description for the transform. 5. Click Import and specify the file name of the XSLT style sheet for the transform. 6. Click View to view the XML for the style sheet, and then click Save as to export the XML to an .xsl file. Create the pipeline 1. Click Basic > Setup > Application Integration Framework > Endpoints and select an endpoint. 2. Click Action policies and select an action. 3. Click Inbound Pipeline or Outbound Pipeline. 4. In the Class name field, select AifXMLTransform. If there is no pipeline, press CTRL+N to add a new pipeline. 5. Click CTRL+S to save. 6. Click Configure.
149
Microsoft Dynamics AX 7. On the Pipeline XSLT transform form, select Apply transform to parameter if the transform applies to an action parameter. If this field is not selected, the transformation will apply to the entire document. 8. If you select Apply transform to parameter, then you must select a parameter from the Parameter name field. 9. In the XSLT ID field, select the identification of the XSLT transform that you entered on the XSLT repository form. 10. If you want any Microsoft Visual Studio scripts in the XSLT file to be executed, select Scripting enabled. 11. Press CTRL+S to save. Note: When an XSLT pipeline transformation run, errors are logged only if the component throws an exception. If you use an incorrect XSLT, an exception will not be generated. An XSLT only transforms matching nodes; if there are no matching modes, then no transformation is applied and no error is generated.
4. On the General tab, select the Microsoft Dynamics AX data type from the list of available data types. For the data types that reference a table in Microsoft Dynamics AX, the internal values are populated from that table. 5. Enter the internal values and the external values for the string substitution in the lower pane of the form.
150
Microsoft Dynamics AX Use a value lookup table with the AifValueSubstitutor pipeline component 1. Click Basic > Setup > Application Integration Framework > Endpoints and select an endpoint. 2. Click Action policies and select an action. 3. Click Inbound Pipeline or Outbound Pipeline. 4. In the Class name field, select AifValueSubstitutor. If there is no pipeline, press CTRL+N to add a new pipeline and press CTRL+S to save. 5. Click Configure. 6. On the Pipeline Value Substitution Parameter Selection form, select the parameter in the Parameter name field. The Pipeline value substitution form is populated with the data fields that are Enabled on the Data Policies form for the document. 7. Enter the Lookup table ID for each data field to be substituted. This is the identifier you entered on the Value lookup form. 8. In the XPath field, you can view the location in the XML schema hierarchy where the element resides. 9. In the Type field, you can view the Microsoft Dynamics AX data type.
151
Microsoft Dynamics AX When the outbound purchase requisition is generated, the active endpoint configuration translates the internal item number codes to the codes that are specified in the Value Mapping form. This translation ensures that each vendor receives the purchase requisition in the format that their system requires. You can map the values of the fields shown in the following table
Type Field
Trading partners
Vendor Account number Customer Account Number Country code County code State code Zip/postal code Item number Units Warehouse numbers Currency code Delivery Methods Terms of delivery Misc. charges
Addresses
Items
Other data
External codes
You set up, define, and maintain external codes in the External codes form. These external codes are for different fields used to send and receive specific documents electronically through Application Integration Framework (AIF). If it is necessary, set up external codes for: Trading partners (vendor and customer account numbers) Addresses (countries/regions, counties, states, and Postal/ZIP Codes) Inventory (item numbers, bar codes, item units, and warehouses) Currency codes
152
Microsoft Dynamics AX Delivery methods Delivery terms Miscellaneous charges Dimensions (department, purpose, cost center)
Map values
You can map the following internal values from Microsoft Dynamics AX to external values in inbound or outbound XML documents by using the Value Mapping form. For more information, see "Set up external codes for AIF" and "Currency code document value" in the Application and Business Processes Help. Map vendor or customer numbers field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the service action for which you want to map field values, and then click Configure to open the Value Mapping form. 4. On the Partners tab, select the trading partner (vendor or customer) for which you want to map field values. 5. In the Document value field, select the type of field value mapping: Not specified Our External code
6. If you selected External code in step 5, select the external code in the Customer code or Vendor code field.
153
Microsoft Dynamics AX Map address field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map address field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to map address field values, and then click Configure to open the Value Mapping form. 4. On the Addresses tab, select the address type (countries, counties, states or ZIP/Postal Codes) for which you want to map field values. 5. In the Document value field, select the type of field value mapping: Not specified Our External code
6. If you selected External code in step 5, specify the external code in the corresponding field. Map terms of delivery, delivery methods, and misc. charges field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to map field values, and then click Configure to open the Value Mapping form. 4. On the Other base data tab, select the field value (terms of delivery, delivery methods, or misc. charges) for which you want to map field values. 5. In the Document value field, select the type of field value mapping: Not specified Our External code
6. If you selected External code in step 5, specify the external code in the corresponding field. Map currency code field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map currency field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to map currency field values, and then click Configure to open the Value Mapping form.
154
Microsoft Dynamics AX 4. On the Other base data tab, in the Handling currency codes section, in the Document value field, select the type of currency field value mapping: Not specified Our External code ISO currency code
5. If you selected External code in step 4, specify the external code in the Currency code field. Map units and warehouse numbers field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to map field values, and then click Configure to open the Value Mapping form. 4. On the Items tab, select the field value (units or warehouse number) for which you want to map field values. 5. In the Document value field, select the type of field value mapping: Not specified Our External code
6. If you selected External code in step 5, specify the external code in the corresponding field. Map item numbers field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to map item number field values, and then click Configure to open the Value Mapping form. 4. On the Items tab, in the Handling item numbers section, in the Document value field, select the type of field value mapping: Not specified Our External code External item number Bar code Company item
155
Microsoft Dynamics AX 5. If you selected External code in step 4, specify the external code in the Item number code field. If you selected Bar code in step 4, select the bar code type that the company uses in the Bar code setup field, and enter the bar code type that your trading partner uses in the Value field.
156
Microsoft Dynamics AX
Document notes
Define the name of the note document type in the Document management parameters form. For more information, see "Document management parameters (form)" in the Application and Business Processes Help.
157
Microsoft Dynamics AX
158
Microsoft Dynamics AX
Prerequisites
If you are setting up a data exchange that uses Web services, you must first perform these steps: 1. Install the Web services on the application integration server. This is the gateway computer that sends and receives AIF messages and communicates with one or more AOSes. For more information, see "Install AIF Web Services" in the Microsoft Dynamics AX Installation Guide. 2. Use the Web sites form to configure the AIF Web site that hosts the Web services. For more information, see Configure Web sites for document exchange
159
Microsoft Dynamics AX
d. Right-click the .svc file and select Browse. An Internet Explorer browser window appears with the service name at the top. The URL to which Internet Explorer points is the URL of the service, for example, http://localhost/MicrosoftDynamicsAXAif50/salesorderservice.svc (you will need the fully-qualified URL without the localhost path in order to successfully call the service). You must create a program to call the appropriate Web service and pass the message to the service. Server and Database Administration Guide 160
Microsoft Dynamics AX Extended configuration The extended configuration provides more flexibility and options for configuring the AIF components that make up a document exchange. This configuration allows you to create your own endpoints, configure action policies for those endpoints, and specify endpoint action data policies. To set up a document exchange with the extended configuration, perform the following steps: 1. Generate the Web services. This step publishes the Web services for external consumption. See Configure services. This step is required. 2. Grant permissions to the Web service. See Grant permissions to a service. This step is required. 3. Create a local endpoint. See Create and configure local endpoints. This step is required if you are going to create an endpoint in the following step. 4. Create and configure an endpoint for the external system that will consume the Web services. This is only necessary if you do not use the default endpoint that ships in AIF. See Creating and configuring endpoints. This step is required if you are not going to use the default endpoint. 5. Configure the endpoint action policy to associate the desired actions with the endpoint. See Configure endpoint action policies. This step is required if you are not going to use the default endpoint. 6. Configure data policies. See Configure endpoint action data policies. This step is required if you are not going to use the default endpoint. 7. Create the XML message. The message you send to AIF through the Web service will vary in format depending on which action you are calling. If you want to create a sales order, then the XML message will contain the create action and the data required to create a sales order in Microsoft Dynamics AX. If you want to request a sales order, then the XML message will contain the read action and the ID of the sales order that you want to retrieve. For more information about messages, see "AIF Messages" in the Microsoft Dynamics AX SDK Help. 8. Get the Web service URL and call service. Follow these steps to get the service URL: a. Click Start > Administrative tools > Internet Information Services (IIS) Manager. b. Expand the Default Web Site node or the Web site node that contains the AIF Web services virtual directory. c. Navigate to the virtual directory MicrosoftDynamicsAXAif50. The services appear in the pane on the right side of the screen and have a file name extension of .svc.
d. Right-click the .svc file and select Browse. An Internet Explorer browser window appears with the service name at the top. The URL to which Internet Explorer points is the URL of the service, for example, http://localhost/MicrosoftDynamicsAXAif50/salesorderservice.svc. You must create a program to call the appropriate Web service and pass the message to the service.
161
Microsoft Dynamics AX Other AIF settings The following forms can be used when configuring a data exchange regardless of whether you are using the minimal configuration or the extended configuration: Use the Global settings form to configure global defaults for configuring adapters, actions, resource locks for batch processing, and schema validation, as well as the default encoding format for documents. For more information, see Configure global settings for document exchange. Use the Pipeline components form to configure optional document transformations, including XSLT style sheet mapping or value substitutions. For more information, see Creating and configuring a pipeline. Use the Value Mapping form to set up optional predefined value mapping that is available for certain documents. For more information, see About value mapping.
Microsoft Dynamics AX 4. In the Virtual directory share path field, enter the path to the content directory that contains the Web service components that are generated. Note: By default, the content directory is located in the <Microsoft Dynamics AX installation path>\AifWebServices (C:\Program Files\Microsoft Dynamics AX\50\AifWebServices, for example). The network share name for this directory is MicrosoftDynamicsAXAif50. 5. To search for the content directory path, on the General tab, click Browse. 6. In the Description field, enter a description of the Web site.
163
Microsoft Dynamics AX An example of resource locking is if you have two AOS instances, AOS1 and AOS2. When AOS1 retrieves messages from the channel, it locks the channel so that AOS2 cannot access those messages and send them out twice. If AOS1 fails, that channel remains locked for the time specified in the global settings. If AOS1 remains unavailable, when the lock expires after 30 minutes, AOS2 can access those messages and deliver them. It is recommended that you monitor the volume of exchanges for your particular system and then set the maximum locking interval. If the locking interval is too short, the locks expire faster. When a lock expires and another AOS is available, the same channel or endpoint is processed again. This can lead to wasted resources because the channel or endpoint is processed continuously when no messages are present. If the locking interval is too long, it takes the system longer to recover in the event of a system failure.
You should change the maximum locking interval after monitoring the volume of exchanges for your particular system. For adapter-based exchanges, AIF implements a scheme for locking endpoints and channels to guarantee that messages are processed in a particular order. After one of the AIF services (AifInboundProcessingService, AifOutboundProcessingService, GatewaySendService, and GatewayReceiveService) begins processing messages related to a channel or an endpoint, a lock is set for that resource. If the service stops processing the resource before all messages have been transferred, the lock on the resource expires after the maximum locking interval, and another service can begin processing that resource. For more information about the AIF batch services, see Start and stop the asynchronous AIF services. The default value for the maximum resource locking interval is 30 minutes. If your installation only runs one instance of the AIF services, and those services are interrupted while processing channels or endpoints, the maximum time before the services can begin processing again is 30 minutes. However, if you are exchanging documents using more than one channel or more than one endpoint and you use multiple AOS instances installed on multiple computers, you may need to set the maximum locking interval for channels and endpoints. 1. Click Basic > Setup > Application Integration Framework > Global settings. 2. Enter the time in minutes in the Maximum resource locking interval (minutes) field. 3. Press CTRL+S to save.
164
Microsoft Dynamics AX
Configure services
Application Integration Framework (AIF) includes a number of services for integrating your system in common business processes. In order to enable an exchange using a service, you must first enable the service. For external systems to consume the service, you must generate it and make it available to external callers.
165
Microsoft Dynamics AX
166
Microsoft Dynamics AX If IIS is installed after the .NET Framework is installed, you must register WCF with IIS and ASP.NET on the computer where Web services are installed by following these steps.
OS Steps
Use the ServiceModelReg tool by entering the following command at a command prompt:
ServiceModelReg.exe /i /x.
This command line tool is located in the WCF directory, for example,
C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation.
167
Microsoft Dynamics AX
Service name
External name
CustomerService
Microsoft Dynamics AX
A ServiceOperation action defines an action that is available from a service. A SendXML action defines an action that is independent of any service or class and is used in X++ to send XML (outbound). The Actions form displays all of the actions that are available.
169
Microsoft Dynamics AX
ServiceOperation Actions
The services that ship with Microsoft Dynamics AX come with one or more of the actions in the following table. These actions are ServiceOperation actions and are read-only in the Actions form.
Service operation
create
Description
Accepts XML data, writes a record to the database, and returns the ID of the new record. Accepts ID values and deletes the associated records. Accepts query criteria and returns the matching data. Accepts query criteria and returns IDs of the matching data. Accepts a list of IDs and returns the associated data. Accepts a list of IDs and data and updates the associated records in the database.
Each service does not implement all of the available actions. Rather, each service implements actions based on the requirements of the business process that the service supports. Follow these steps for more information about the service operations that are supported by a service: 1. Click Basic > Setup > Application Integration Framework > Services 2. Select a service and click > Service Operations. The Service Operations form lists all of the available operations. 3. To view the parameters for a service operation, select the operation and click Parameter schema.
170
Microsoft Dynamics AX
Delete a SendXML action 1. Click Basic > Setup > Application Integration Framework > Actions. 2. Select an action and click ALT+F9. Note: You should ensure that an action is not used in an action policy for any endpoints before deleting the action.
171
Microsoft Dynamics AX
Default endpoint
Microsoft Dynamics AX ships with an endpoint called the default endpoint. Therefore, it is not necessary to create an endpoint for data exchange. Creating and configuring a specific endpoint is optional, and if a message does not specify an endpoint, AIF implicitly uses the default endpoint. If you disable the default endpoint in Microsoft Dynamics AX, then you must create a specific endpoint and all requests must reference that endpoint or the message will be rejected.
Specific endpoints
You may want to create endpoints for data exchange for a variety of reasons. Endpoints are useful in business-to-business scenarios where you want put restrictions on a data exchange. With endpoints you can: Set constraints on the endpoint. Constraints specify that messages can only be sent to or received from specific customers, vendors, or warehouses. Implement a higher level of security by assigning specific users or groups to an endpoint. This ensures that only certain users can send messages to AIF. Assign actions to an endpoint to restrict the types of data exchanges in which the endpoint can participate. Set data policies on an endpoint to restrict the data that can be retrieved or updated. Implement custom configuration requirements like XSLT transformations, value mapping, and custom pipeline components. Customize the message logging for each action associated with an endpoint.
Prerequisites
Before you can create an endpoint, the following must already exist and be configured: A local endpoint. A named service operation for the exchange, for example, CustCustomerService.read. For more information, see Creating and configuring actions. Microsoft Dynamics AX users that will be associated with the endpoint. An outbound channel must be already be defined if needed. 172
Microsoft Dynamics AX
Endpoint information
When you configure an endpoint, you enter information about the following: Identifying information for the endpoint, including a unique identifier, a friendly name, the active status, error handling information, the associated channel, and the Microsoft Dynamics AX company identification. Constraints on the endpoint that restrict document exchange by defining valid Microsoft Dynamics AX customers, vendors, or warehouses. Microsoft Dynamics AX users and trusted intermediaries that are allowed to submit documents for the exchange. Endpoint action policies that relate actions to the endpoint. Pipeline components for any optional document transformations for the action related to the endpoint. Endpoint action data policies (also known as data policies) that define which fields in a document are allowed or required to participate in the exchange. Document configuration options, including value mapping. For more information, see About value mapping and "Set up external codes for AIF" in Applications and Business Processes.
Configure an endpoint
When you configure an endpoint, you enter information in the Endpoints form about the following: Identifying information for the endpoint, including a unique identifier, a friendly name, the active status, error handling information, the intercompany status, local endpoint, Microsoft Dynamics AX company identification for an intercompany exchange, outbound channel information, and encoding format for the transfer. Constraints on the endpoint that restrict document exchange by defining valid Microsoft Dynamics AX customers, vendors, or warehouses. Microsoft Dynamics AX users and trusted intermediaries that are allowed to submit documents for the exchange. Endpoint action policies that relate actions to the endpoint. Pipeline components for an action related to the endpoint. Endpoint action data policies that define which fields in a document are allowed or required for the exchange.
173
Microsoft Dynamics AX Available tabs In the Endpoints form, user interface tabs are available depending on what type of endpoint you select in the Overview tab.
Endpoint type Tabs enabled
Default endpoint
Specific endpoint
Default endpoint Microsoft Dynamics AX ships with a default endpoint that can be used to enable data exchanges as soon as services are generated. The default endpoint has minimal configuration options, and you cannot add any constraints or users to the default endpoint. By default, all actions are enabled for the default endpoint but you must still enable the service actions on the AIF Services form. You can change the following options on the default endpoint: In the Endpoints form, you can update the Active field and the Propagate errors field. For more information about these fields, see Create an endpoint. In the Endpoint Action Policies form, you can enable and configure actions. In the Endpoint action data policies form, you can define which fields are allowed or required in the data exchange. In the Pipeline components form, you can define data transformations for inbound or outbound exchanges. In the Parameter Schemas form, you can view the schema of the action parameters and the return value and optionally save them to an .xsd file. In the Value Mapping form, you can configure value mapping.
174
Microsoft Dynamics AX Configure endpoint identification 1. Click Basic > Setup > Application Integration Framework.> Endpoints. 2. Press CTRL+N to create a new endpoint, or select an existing endpoint from the list to be modified. 3. Enter the information for the endpoint on the General tab, including the unique endpoint identification information, the friendly name for the endpoint, the local endpoint ID, and the default encoding format. 4. Select Propagate errors to return detailed error messages to the endpoint. Note: By default, Microsoft Dynamics AX logs detailed errors and sends a generic error back to the endpoint. Enabling this field will send the detailed error to the endpoint. Only select this field if it is acceptable to send detailed error information to an endpoint. 5. For intercompany transfers, select Intercompany organization if the endpoint is a company within your Microsoft Dynamics AX installation, and select a company in the Company field. 6. Do not select Intercompany organization unless the endpoint is to be used in an intercompany transfer. For more information about these transfers, see "Manage intercompany sales orders" or "Manage intercompany purchase orders" in the Application and Business Processes Help. 7. Selecting an outbound channel is not required for all exchanges. However, if your Microsoft Dynamics AX installation is sending messages to this endpoint (for example, if you are configuring an outbound-only exchange), you must select a channel in the Outbound channel ID field. 8. In the Local endpoint ID field, select the local endpoint that participates in exchanges with this endpoint. Note: There may be more than one local endpoint configured for your Microsoft Dynamics AX installation. If that is the case, then make sure to select the correct local endpoint to participate in the exchange with the endpoint that you are configuring. 9. View the pre-populated setting for encoding format in the Default encoding format field. This setting defaults to the value set on the Integration Framework global settings form.
175
Microsoft Dynamics AX Configure constraints on an endpoint and activate the endpoint 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Press CTRL+N to create a new endpoint, or select an existing endpoint from the list to be modified. Note: You cannot add constraints to the default endpoint so the Constraints tab will not be enabled if the default endpoint is selected. 3. On the Constraints tab, select No constraints to clear the form and allow data to be exchanged regardless of any association. The No constraints check box becomes unavailable. However, if you add constraints later, the check box clears itself. 4. Press CTRL+N to create a new constraint. 5. Choose the Constraint type (Vendor, Customer, or Warehouse). 6. Select a Constraint ID from the list. The Name field is completed when you select the Constraint ID. 7. On the Overview tab, select Active to activate the endpoint. Messages flow through the framework from the local endpoint to and from any active endpoints. Configure users and trusted intermediaries for an endpoint You must enter information for at least one endpoint user or trusted intermediary who is authorized to initiate transactions for the endpoint on the Users tab. Notes: When configuring users on an endpoint, remember that these Microsoft Dynamics AX users may represent outside interests and must have permissions set appropriately. For more information about configuring Microsoft Dynamics AX users, see "Setting up and maintaining security" in the Microsoft Dynamics AX Installation Guide and the following topics in the System and Application Setup Help: "Manage security permissions for user groups and domain combinations," "Manage user groups," and "Manage users." You must also set the appropriate security keys and record-level security for any users that are granted access to Microsoft Dynamics AX through Application Integration Framework (AIF), to help prevent unauthorized data access. For more information, see "Manage record level security" in the Application and Business Processes Help. Certain actions cause data to be written directly to the Microsoft Dynamics AX database without manual end-user verification (for example, creating exchange rates). When configuring endpoints and creating new actions, be especially careful to restrict access to trusted and reliable partners or applications.
176
Microsoft Dynamics AX Configure an endpoint user 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Press CTRL+N to create a new endpoint, or select an existing endpoint from the list to be modified. Note: You cannot add users or user groups to the default endpoint so the Users tab will not be enabled if the default endpoint is selected. 3. Click the Users tab. 4. Under Endpoint users, in the User type field, select either User or User group. 5. In the Application user or group field, select a valid Microsoft Dynamics AX user or user group name. The Name field is filled in automatically. For more information about Microsoft Dynamics AX users and user groups, see "Setting up and maintaining security" in the System and Application Setup Help. Configure a trusted intermediary Trusted intermediaries are middleware applications that reside between external endpoints and AIF. That is, they are Microsoft Dynamics AX users (or user groups) that are authorized to submit inbound requests on behalf of the endpoint. A trusted intermediary prevents an unauthorized user from accessing AIF and is typically used in a business-to-business data exchange scenario. For more information about trusted intermediaries, see Security considerations for AIF. For more information about Microsoft Dynamics AX users and user groups, see "Setting up and maintaining security" in the System and Application Setup Help. 1. Under Trusted intermediaries, select Use trusted intermediary to enable a trusted intermediary for exchanges with this endpoint. Note: If the Use trusted intermediary box is checked, there must be at least one entry in the Trusted intermediaries grid. 2. Under Trusted intermediaries, in the User type field, also select either User or User group. 3. In the Application user or group field, select a valid Microsoft Dynamics AX user or user group name. The Name field is filled in automatically. Configure action policies, data policies, and pipeline components for an endpoint 1. After you have completed the preceding steps, click Action policies to configure actions on the endpoint. For more information about action policies, see Configure endpoint action policies. 2. Press CTRL+S to save the action policy.
177
Microsoft Dynamics AX 3. From the Endpoint Action Policies form, select an action, press CTRL+S, and click Data Policies to enter information about which fields are required and which are optional in the document to be exchanged. 4. Click Configure to perform document-specific configuration, including value mapping, for the document exchange. Value mapping is translation of field data values based on business rules, for example, translating internal item numbers to vendor-specific item numbers or industry standard numbers depending on the trading partner. For more information, see Configure endpoint action data policies. 5. Click Inbound Pipeline or Outbound Pipeline to configure the pipeline components for any custom transformations performed on the document. For more information, see Creating and configuring a pipeline. 6. Click Parameter schema to see a list of parameters and the return value for the selected action. On the Parameter Schemas form, click View schema to view the XML schema for the selected parameter or return value. On the Schema form, you can click Save as to save the schema as an .xsd file. Give the endpoint user access to Business Connector when using Web services When you configure an endpoint for Web services, you must configure an endpoint user and/or trusted intermediary, as outlined above. Next, you must give that Microsoft Dynamics AX user or user group access to the Business Connector. 1. Click Administration > Setup > User groups and select the user group for the endpoint, or the user group that contains the user for the endpoint. 2. Click Permissions. 3. On the Permissions tab, select Business Connector and then select Full control. 4. Click Cascade. Disable an endpoint To disable an endpoint, follow these steps. 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select an endpoint in the grid and clear the Active field. Important: For adapter-based exchanges, outbound messages are processed completely even when the endpoint is disabled during processing and a response may still be sent. To ensure that no data is sent from AIF when disabling an endpoint, first disable the batch processing jobs. Be sure that there are no outbound messages in the queue, disable the endpoint, and then restart the batch processing jobs.
178
Microsoft Dynamics AX
Create an endpoint
Before you can create an endpoint, the following must already exist and be configured: A local endpoint. An enabled service operation for the exchange, for example, CustCustomerService.read. For more information, see Creating and configuring actions. Microsoft Dynamics AX users that will be associated with the endpoint. An outbound channel must be already be defined if needed.
Create the endpoint 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Press CTRL+N to create a new endpoint. 3. In the Endpoint ID field, type a unique identifier for the endpoint. 4. In the Name field, type a friendly name. 5. Select Propagate errors to return detailed error messages to the endpoint. Note: By default, Microsoft Dynamics AX logs detailed errors and sends a generic error back to the endpoint. Enabling this field will send the detailed error to the endpoint and could be a potential security risk. Only select this field if it is acceptable to send detailed error information to an endpoint. 6. Do not select Intercompany organization unless the endpoint is to be used in an intercompany transfer. For more information about these transfers, see "Manage intercompany sales orders" or "Manage intercompany purchase orders" in the Application and Business Processes Help. 7. If you select Intercompany organization, then you must select a company in the Company field. 8. In the Outbound channel ID field, select an outbound channel. You must select a channel if the endpoint will be used in an adapter-based exchange and data is to be sent outbound from Microsoft Dynamics AX to the endpoint. If the endpoint is participating only in Web servicesbased exchanges, the outbound channel is not necessary. 9. In the Local endpoint ID field, select the identifier for the local endpoint (your system) that participates in the exchange with the endpoint that you are configuring. 10. In the Default encoding format field, select the encoding format for this endpoint. 11. On the Constraints tab, enter the data constraints for the endpoint to restrict the data that can be processed by the endpoint. To allow data to be exchanged regardless of any associations, click No constraints. For more information, see Configure an endpoint. After selecting, the No constraints check box becomes unavailable. However, if you add constraints later, the check box clears itself. 12. On the Overview tab, select Active to enable the endpoint to participate in data exchanges. Server and Database Administration Guide 179
Microsoft Dynamics AX 13. On the Users tab, enter information to restrict users that are authorized to initiate transactions for the endpoint. In the User type field, select either User or User group. You can also designate trusted intermediaries on the Users tab. Trusted intermediaries are middleware applications that reside between external endpoints and Application Integration Framework (AIF), that is, they are Microsoft Dynamics AX users (or user groups) that are authorized to submit inbound requests on behalf of the endpoint. For more information about trusted intermediaries, see Security considerations for AIF. Notes: When configuring users on an endpoint, keep in mind that these Microsoft Dynamics AX users may represent outside interests and must have permissions set appropriately. For more information about configuring Microsoft Dynamics AX users, see "Setting up and maintaining security" in the Microsoft Dynamics AX Installation Guide and the following topics in the System and Application Setup Help: "Manage security permissions for user groups and domain combinations," "Manage user groups," and "Manage users." You must also set the appropriate security keys and record-level security for any users that are granted access to Microsoft Dynamics AX through AIF to help prevent unauthorized data access. For more information, see "Manage record level security" in the Application and Business Processes Help. Certain actions cause data to be written directly to the Microsoft Dynamics AX database without manual end-user verification (for example, creating exchange rates). When configuring endpoints and creating new actions, be especially careful to restrict access to trusted and reliable partners and applications.
14. Click Action policies to configure actions on the endpoint with the Endpoint Action Policies form. Examples of actions include the service operations read and create. For information on setting up action policies, see Configure endpoint action policies. 15. From the Endpoint Action Policies form you can select an action and click Data Policies to enter the data policy, that is, information about which fields are required and which are optional in the document to be exchanged. For details on setting up data policies, see Configure endpoint action data policies. 16. From the Endpoint Action Policies form, you can click Configure to perform documentspecific configuration, including value mapping. Value mapping is the translation of field data values based on business rules, for example, translating internal item numbers to vendorspecific item numbers or industry standard numbers depending on the trading partner. For more information, see Configure endpoint action data policies.
180
Microsoft Dynamics AX Enabled fields The fields that are enabled for an endpoint depend on the type of endpoint that you are configuring as shown in the following table.
Field Default endpoint Standard endpoint Intercompany endpoint
Endpoint ID
No
No Yes Yes No
No
Yes No No No
Troubleshooting trusted intermediary If you receive an error on an inbound message and it was submitted by a trusted intermediary, it may be due to the fact that the submitting user of the message and the user specified in the message SourceEndpointUser element are not in the same Microsoft Dynamics AX domain. The trusted intermediary is a valid Microsoft Dynamics AX user that is allowed to submit AIF messages. Typically, the trusted intermediary does not have access to the AIF services. The source endpoint user is a valid Microsoft Dynamics AX user that has access to the AIF services. If the user submitting the message (the trusted intermediary) is in a different domain than the source endpoint user, you may receive an error. To resolve this problem, give the source endpoint user open domain access permissions. To locate the security key for these permissions, use the following steps. 1. Open Administration > Setup > User groups. 2. Click Permissions.
181
Microsoft Dynamics AX 3. On the click Permissions tab, expand the Administration node and select Open domain access. Note: This refers to Microsoft Dynamics AX domains and not Active Directory domains. Microsoft Dynamics AX domains are defined in Administration > Setup > Domains. For more information, see "Manage security permissions for user groups and domain combinations" in and "Manage domains" in the System and Application Setup Help.
182
Microsoft Dynamics AX 5. Select the Is default policy check box to use the default data policy. The default data policy specifies that all fields defined in the message schema will be used in the exchange. If you clear this field, the Data Policies button is enabled, and you can modify the data policy for the action. Note: This field is only editable for the default endpoint. By default, the Is default policy check box is selected for all actions associated with the default endpoint. If you want to modify the data policy for an action associated with the default endpoint, you must clear this field. 6. You can change the status of an action associated with the endpoint to Enabled, Disabled, or Hold. Select Enabled to make the action active for this endpoint. Selecting Disabled has the same effect as if the action was not configured on the endpoint. Select Hold to prevent outbound documents from being passed to the adapter and inbound documents from being passed to the document class. If the action status is Hold, the document is held in the queue and may be examined and resubmitted. For more information, see Edit and resubmit messages in the queues. For a synchronous exchange such as a Web service, an error message is generated for the hold condition. In the External identifier override field, type an action identifier to override the External identifier field on the Actions form. Any messages referencing this endpoint and action must use the external identifier in the <Action> tag. 7. Select the Automatically respond to errors check box to send any errors that are encountered back to the caller. 8. Press CTRL+S to save.
183
Microsoft Dynamics AX 4. On the General tab, select a logging mode for the endpoint action. Log Original captures only the information for the initial document exchange. Log All captures information about every transfer including all the different versions of a document, for example, the submitted XML, the XML generated after each pipeline transformation is applied, and so on. Log None stores no data for this action and endpoint.
To view the document history by message or by document, click Basic > Periodic > Application Integration Framework > Document history.
184
Microsoft Dynamics AX
Mandatory/required fields
There are two types of qualifiers for data fields on the Data Policies form: required and enabled. These have different meanings and effects depending on the direction of the transfer. If a data field is allowed to be included in an inbound exchange, it is said to be enabled. For inbound documents, only fields that are enabled are allowed to be submitted by the endpoint. If a document is received that includes fields that are not enabled, the document is rejected and an exception is logged. There are two terms that are used when discussing whether a field is required in a document: mandatory fields and required elements.
Term Location Description
Mandatory field
Database
Database field that has the Mandatory property set to Yes. Element required to be present in the XML document to satisfy the schema. Required elements often correspond to mandatory fields in the database. A database field that is mandatory but that can be defaulted does not have to be required in the XML document.
Required element
XML document
Note: For inbound documents, mandatory fields (that is, fields required by the Microsoft Dynamics AX database) should be set to Enabled and Required on the Data Policies
185
Microsoft Dynamics AX form if they cannot be set by default in the database. For outbound documents, the fields to be sent must be set to Enabled.
186
Microsoft Dynamics AX 4. For other fields in the document, you can select Required if the field is required for the document exchange (Enabled is automatically set). Note: If you find that your needs for the document transfers change, you can clear the Required check box. 5. Click Set to clear or select all fields at one time.
The AifValueSubstitutor pipeline component allows you to substitute one character string for another character string in a given field. This enables you to change field values (an item code, for example) in an inbound or outbound message to match the requirements of the system receiving the data. To apply XSLT document transformations, you must first import an XSLT style sheet into Microsoft Dynamics AX and then specify the AifXMLTransform pipeline component for the desired endpoint action policy.
187
Microsoft Dynamics AX Prerequisites You can automatically configure pipeline components for actions that are associated with the default endpoint. Otherwise, before configuring any pipeline components, you must have the following: A local endpoint. For more information, see Create and configure local endpoints. An endpoint with an action policy and a data policy. For more information, see Configure an endpoint, Configure endpoint action policies, and Configure endpoint action data policies.
Create a pipeline 1. Click Basic > Setup > Application Integration Framework > Endpoints and select an endpoint. 2. Click Action policies and select an action. 3. Click Inbound Pipeline or Outbound Pipeline depending on whether you want the transformations to occur on inbound documents or outbound documents. 4. Press CTRL+N to create a new pipeline component entry. 5. Select a component in the Class name field. There may be a delay while the system scans the AOT for pipeline components. 6. In the Description field, type a description of the pipeline. 7. Press CTRL+S to save and enable the Configure button. 8. Each pipeline component has different configuration requirements, so you see a different form when you click Configure for any pipeline component. For more information, see Configure a pipeline.
Configure a pipeline
Configuring a pipeline for an action on an endpoint involves specifying the pipeline components for a transformation of the document, in execution order, on the Pipeline components form. You can define pipeline components for inbound or outbound actions separately. For more information about creating a pipeline, see Creating and configuring a pipeline. Two pipeline components are included with Microsoft Dynamics AX. You can configure these pipeline components to perform value substitution and XSLT transformations. Other custom pipeline components may be developed for your system by your team or outside consultants or partners. Configuration of any custom pipeline component depends entirely on the implementation of that component. The two pipeline components available with your Microsoft Dynamics AX installation are:
AifValueSubstitutor AifXMLTransform
You can include as many pipeline components as you need to transform the document to meet the needs of the exchange. Each pipeline component has different configuration requirements, so you see a different form when you click Configure for any pipeline component. Server and Database Administration Guide 188
Microsoft Dynamics AX Configure value substitution Before you can configure a value substitution pipeline, you must define lookup values. For more information, see About value lookups. 1. Click Basic > Setup > Application Integration Framework > Endpoints and select an endpoint. 2. Click Action policies and select an action. 3. Click Inbound Pipeline or Outbound Pipeline. 4. In the Class name field, select AifValueSubstitutor. If there is no pipeline, press CTRL+N to add a new pipeline. 5. Press CTRL+S to save. 6. Click Configure. 7. On the Pipeline Value Substitution Parameter Selection form, select the parameter in the Parameter name field. 8. Click Configure value substitution to display the Pipeline value substitution form. 9. In the Lookup table ID field, select the lookup table identification for the value lookup table (that you entered on the Value lookup form) for the fields requiring value substitution. For more information about configuring value lookups, see About value lookups. Notes: Values for Lookup table ID are filtered by type. If no values are displayed for Lookup table ID, you may need to return to the Value lookup form and enter a value for Type on the General tab. On the Pipeline value substitution form, the following read-only fields appear: Element name - The name of the data field. XPath - Specifies where the data field fits into the schema hierarchy. Type - The Microsoft Dynamics AX data type.
Configure an XSLT transform To configure a transformation pipeline, you must first import the XSLT into the repository. Then you must create the transformation pipeline based on the XSLT. For more information about security best practices when implementing transformations, see Security considerations for AIF. Add an XSLT style sheet to the XSLT repository 1. Click Basic > Setup > Application Integration Framework > XSLT repository. 2. Click CTRL+N to create a new record. 3. In the XSLT ID field, enter a unique identifier for the XSLT transform. 4. In the Name field, enter a text description for the transform.
189
Microsoft Dynamics AX 5. Click Import and specify the file name of the XSLT style sheet for the transform. 6. Click View to view the XML for the style sheet, and then click Save as to export the XML to an .xsl file. Create the pipeline 1. Click Basic > Setup > Application Integration Framework > Endpoints and select an endpoint. 2. Click Action policies and select an action. 3. Click Inbound Pipeline or Outbound Pipeline. 4. In the Class name field, select AifXMLTransform. If there is no pipeline, press CTRL+N to add a new pipeline. 5. Click CTRL+S to save. 6. Click Configure. 7. On the Pipeline XSLT transform form, select Apply transform to parameter if the transform applies to an action parameter. If this field is not selected, the transformation will apply to the entire document. 8. If you select Apply transform to parameter, then you must select a parameter from the Parameter name field. 9. In the XSLT ID field, select the identification of the XSLT transform that you entered on the XSLT repository form. 10. If you want any Microsoft Visual Studio scripts in the XSLT file to be executed, select Scripting enabled. 11. Press CTRL+S to save. Note: When an XSLT pipeline transformation run, errors are logged only if the component throws an exception. If you use an incorrect XSLT, an exception will not be generated. An XSLT only transforms matching nodes; if there are no matching modes, then no transformation is applied and no error is generated.
190
Microsoft Dynamics AX Configure value lookups for a pipeline component 1. Click Basic > Setup > Application Integration Framework > Value lookup. 2. Press CTRL+N to create a new line. 3. On the Overview tab, enter: A new identification in the Lookup table ID field. A name for the table in the Name field.
4. On the General tab, select the Microsoft Dynamics AX data type from the list of available data types. For the data types that reference a table in Microsoft Dynamics AX, the internal values are populated from that table. 5. Enter the internal values and the external values for the string substitution in the lower pane of the form. Use a value lookup table with the AifValueSubstitutor pipeline component 1. Click Basic > Setup > Application Integration Framework > Endpoints and select an endpoint. 2. Click Action policies and select an action. 3. Click Inbound Pipeline or Outbound Pipeline. 4. In the Class name field, select AifValueSubstitutor. If there is no pipeline, press CTRL+N to add a new pipeline and press CTRL+S to save. 5. Click Configure. 6. On the Pipeline Value Substitution Parameter Selection form, select the parameter in the Parameter name field. The Pipeline value substitution form is populated with the data fields that are Enabled on the Data Policies form for the document. 7. Enter the Lookup table ID for each data field to be substituted. This is the identifier you entered on the Value lookup form. 8. In the XPath field, you can view the location in the XML schema hierarchy where the element resides. 9. In the Type field, you can view the Microsoft Dynamics AX data type.
191
Microsoft Dynamics AX
Trading partners
Vendor Account number Customer Account Number Country code County code State code Zip/postal code Item number Units Warehouse numbers Currency code Delivery Methods Terms of delivery Misc. charges
Addresses
Items
Other data
192
Microsoft Dynamics AX
External codes
You set up, define, and maintain external codes in the External codes form. These external codes are for different fields used to send and receive specific documents electronically through Application Integration Framework (AIF). If it is necessary, set up external codes for: Trading partners (vendor and customer account numbers) Addresses (countries/regions, counties, states, and Postal/ZIP Codes) Inventory (item numbers, bar codes, item units, and warehouses) Currency codes Delivery methods Delivery terms Miscellaneous charges Dimensions (department, purpose, cost center)
Map values
You can map the following internal values from Microsoft Dynamics AX to external values in inbound or outbound XML documents by using the Value Mapping form. For more information, see "Set up external codes for AIF" and "Currency code document value" in the Application and Business Processes Help. Map vendor or customer numbers field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the service action for which you want to map field values, and then click Configure to open the Value Mapping form. Server and Database Administration Guide 193
Microsoft Dynamics AX 4. On the Partners tab, select the trading partner (vendor or customer) for which you want to map field values. 5. In the Document value field, select the type of field value mapping: Not specified Our External code
6. If you selected External code in step 5, select the external code in the Customer code or Vendor code field. Map address field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map address field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to map address field values, and then click Configure to open the Value Mapping form. 4. On the Addresses tab, select the address type (countries, counties, states or ZIP/Postal Codes) for which you want to map field values. 5. In the Document value field, select the type of field value mapping: Not specified Our External code
6. If you selected External code in step 5, specify the external code in the corresponding field. Map terms of delivery, delivery methods, and misc. charges field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to map field values, and then click Configure to open the Value Mapping form. 4. On the Other base data tab, select the field value (terms of delivery, delivery methods, or misc. charges) for which you want to map field values. 5. In the Document value field, select the type of field value mapping: Not specified Our External code
6. If you selected External code in step 5, specify the external code in the corresponding field.
194
Microsoft Dynamics AX Map currency code field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map currency field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to map currency field values, and then click Configure to open the Value Mapping form. 4. On the Other base data tab, in the Handling currency codes section, in the Document value field, select the type of currency field value mapping: Not specified Our External code ISO currency code
5. If you selected External code in step 4, specify the external code in the Currency code field. Map units and warehouse numbers field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to map field values, and then click Configure to open the Value Mapping form. 4. On the Items tab, select the field value (units or warehouse number) for which you want to map field values. 5. In the Document value field, select the type of field value mapping: Not specified Our External code
6. If you selected External code in step 5, specify the external code in the corresponding field. Map item numbers field values 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to map field values, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to map item number field values, and then click Configure to open the Value Mapping form.
195
Microsoft Dynamics AX 4. On the Items tab, in the Handling item numbers section, in the Document value field, select the type of field value mapping: Not specified Our External code External item number Bar code Company item
5. If you selected External code in step 4, specify the external code in the Item number code field. If you selected Bar code in step 4, select the bar code type that the company uses in the Bar code setup field, and enter the bar code type that your trading partner uses in the Value field.
196
Microsoft Dynamics AX How to set disable defaulting for inbound documents 1. Click Basic > Setup > Application Integration Framework > Endpoints. 2. Select the endpoint for which you want to disable defaulting, and then click Action policies to open the Endpoint Action Policies form. 3. Select the action for which you want to disable defaulting, and then click Configure to open the Value Mapping form. 4. In the Setup tab, clear the Use defaulting field. 5. To enable data validation, select the Use defaulting field again.
Document notes
Define the name of the note document type in the Document management parameters form. For more information, see "Document management parameters (form)" in the Application and Business Processes Help.
197
Microsoft Dynamics AX
198
Microsoft Dynamics AX 5. To change the number of returned documents, select Specified in the (Limitation type field and enter the maximum number of documents returned by a request in the (Max. number of documents field. Note: If you send a request to AIF and anticipate the return of many large documents, you may want to first send a request using the findKeys action to return only all the entity keys (IDs) that match the criteria. After you receive a message with the entity keys, you can then manage processing of the data based on how many records the query returns.
Document history
For both adapter-based and Web services-based exchanges, information about messages and document history is organized by action for each endpoint. You set the parameters for logging this information when you configure endpoint action policies. You view the logged information on the Document history form by clicking Basic > Periodic > Application Integration Framework > Document history. For more information, see View document history, Viewing the document log and "AIF Document history (form)" in the Application and Business Processes Help.
Queue manager
For adapter-based exchanges, you use the Microsoft Dynamics AX batch functionality to start and stop the operation of the four services that move messages in to and out of the document processing queues. After documents are exchanged, you can monitor the activity of documents in the queues in the Queue manager. You can also edit and resubmit documents that have errors with the Queue manager form. To open the Queue manager, click Basic > Periodic > Application Integration Framework > Queue manager. For more information, see Edit and resubmit messages in the queues.
199
Microsoft Dynamics AX
Exceptions
You can view information about AIF error messages when they occur by clicking Basic > Periodic > Application Integration Framework > Exceptions. The Exceptions form contains information about the module and subsystem where the error occurred, a description of the error, when the error was logged, the user associated with the error, and the form or business logic where the error occurred. For more information, see Viewing the exceptions log.
Until these batch jobs are started, no documents can be processed in adapter-based exchanges. Inbound documents do not enter your Microsoft Dynamics AX system and outbound documents accumulate in the AIF outbound processing queue. Each of these AIF services is implemented as a task in a Microsoft Dynamics AX batch job. For more information about batch jobs, see "Processing batch jobs" in the Application and Business Processes Help.
200
Microsoft Dynamics AX You can create a single batch job to support both inbound and outbound processing tasks, or you can create multiple batch jobs to run on one or more computers, depending on your processing needs. To start the services and allow AIF to begin processing documents from the queues, perform the following steps: 1. Create a batch job. 2. Add a task for each of the AIF queue processing services to the batch job. 3. Start the batch job by changing the status to Waiting.
6. Press CTRL+S to save. 7. Click Recurrence to set how frequently the batch job should run. Note You cannot change batch information while the job is running or waiting to be run. You must change the batch status to Withhold before changing batch information.
201
Microsoft Dynamics AX
For more information, see "Batch tasks (form)" in the Application and Business Processes Help. To add tasks for the AIF services to the batch job, follow these steps: 1. Click Basic > Inquiries > Batch job. 2. Select a job and click View tasks. This opens the Batch tasks form. 3. Press CTRL+N to add a new task. 4. In the Task description field, enter a text description of the task. 5. In the Company accounts field, select the company for which the task will run. 6. In the Class name field, select AifGatewayReceiveService. This specifies that this task will run the receive service. 7. Press CTRL+S to save. 8. Repeat steps 3 through 7 and select AifInboundProcessingService in the Class name field. 9. Repeat steps 3 through 7 and select AifOutboundProcessingService in the Class name field. 10. Repeat steps 3 through 7 and select AifGatewaySendService in the Class name field. 11. Add the appropriate batch constraints to ensure that the services are processed in the correct order.
202
Microsoft Dynamics AX
Information about messages and document history are organized by action for each endpoint. Set the parameters for logging when you configure endpoint action policies. For more information, see Configure endpoint action policies.
203
Microsoft Dynamics AX
3. Click the General tab to view the Message ID field. 4. Click the Details tab to view the following information: The message direction (inbound or outbound). The pipeline identification (if any). User information for the endpoint (the Microsoft Dynamics AX user associated with the endpoint) and the submitting user. This is the user associated with the process that submitted the message (either the Microsoft Dynamics AX user that submitted the message for the source endpoint or a trusted intermediary). For more information, see Configure an endpoint. For outbound documents sent in response to read requests, the Request message ID field shows the message ID for the original request. Processing details, which include the Channel, the Adapter, and the Transport address used in the exchange.
5. Click Correlation to view the record in the database that corresponds to the message. 6. Click Document logs to view the raw XML for each version of the document as it is transformed by each of the components in the pipeline. 7. Click Clear document XML to clear all or some of the XML for any of the versions of the document that currently exist in the system.
204
Microsoft Dynamics AX
Delete a message
When you delete a message on the Document history form, you delete it from the AifMessageLog table. 1. Click Basic > Periodic > Application Integration Framework > Document history. 2. In the Display by field, filter by Message. 3. Press ALT+F9 to delete the record from the document history.
If the status for a message is Ready, you can change it to Hold and vice versa. You can delete or edit a particular message if its status is set to Error or Hold. For more information, see Start and stop the asynchronous AIF services and "AIF Queue manager (form)" in the Application and Business Processes Help.
205
Microsoft Dynamics AX 3. On the Details tab, view information about the submitting user, the Microsoft Dynamics AX user identification for the endpoint, and the date and time the message was created. 4. Click Refresh to update the display. 5. Click Document log to view information about the document contained in the message, depending on the log options set for the endpoint on the Endpoint Action Policies form: If the Logging mode field is set to Log All, then you can click Document log to view the document at each stage of its transformation. If the Logging mode field is set to Log Original, then you can click Document log to view the original document. If the Logging mode is set to Log None, then no document log is available.
Delete a message
If a message remains unprocessed in the AIF queues, you can delete it in Queue manager. 1. Click Basic > Periodic > Application Integration Framework > Queue manager to view a list of current messages in the queues. 2. If the value in the Status field is Error, Malformed XML, or Hold, then you can delete it. 3. Press ALT+F9 to delete the message.
For more information about setting these options, see Configure endpoint action policies.
206
Microsoft Dynamics AX To view the document log, follow these steps. 1. Click Basic > Periodic > Application Integration Framework > Document history. 2. In the Display by field, select Document. 3. On the Overview tab, select a document and click Document logs. In the Document log form, you can view a record of the numbered versions of the document and the related processing steps, as well as the date and time for each log entry. To view the XML associated with one of the versions, select the record and click View XML.
207
Microsoft Dynamics AX
You will need a maintenance strategy for all the environments that you run: production, development, and test. This section provides information about planning backup and data recovery strategies for the Microsoft Dynamics AX system.
208
Microsoft Dynamics AX
Creating backups will help you recover a damaged database. Backups of a database are also useful for routine purposes, such as copying a database from one server to another, setting up database mirroring, and archiving for governmental purposes. Backing up and restoring data should be customized for a particular environment and must work with the available resources. A well-designed backup and recovery strategy maximizes data availability and minimizes data loss, considering your particular business requirements. The backup part of the strategy defines the type and frequency of backups, the nature and speed of the hardware that is required for them, how backups are tested, and where and how backup media is stored (including security considerations). The recovery part of the strategy defines how databases should be restored to meet your goals for availability of the database and for minimizing data loss, and who should recover the data. We recommend that you document your backup and recovery procedures and keep a copy of the documentation in your operations manual. Designing an effective backup and recovery strategy requires careful planning, implementation, and testing. Consider a variety of factors, including: The production goals of your organization for the databasesespecially the requirements for availability and protection of data from loss. Constraints on resources such as hardware, personnel, space for storing backup media, and the physical security of the stored media.
209
Microsoft Dynamics AX The nature of each of your databases: How frequently does the data in each database change? Are some tables modified more frequently than others? What are your critical database production periods? What are the usage patterns during these periods? When does the database experience heavy use, resulting in frequent inserts and updates? You might want to schedule differential or log backups during periods of the heaviest use and schedule full backups during off-peak hours.
Refer to the database documentation for detailed information about how to select and implement a backup and recovery strategy.
See Also
Microsoft SQL Server documentation Microsoft Windows SharePoint Services documentation
210
Microsoft Dynamics AX hardware, recovery will be completed in 48 hours, and data will be restored only through the end of the previous week. A disaster recovery plan can be structured in many different ways and can contain many types of information. Disaster recovery plan types include the following: A plan to acquire hardware. A communication plan. A list of people to be contacted if there is a disaster. Ownership for each phase of the recovery plan. A checklist of required tasks for each recovery scenario. To help you review how disaster recovery progressed, it helps to initial each task as it is completed, and indicate the time of completion on the checklist.
211
Microsoft Dynamics AX
Microsoft Dynamics AX
Optimizing performance
This section provides information about monitoring and tuning servers to improve Microsoft Dynamics AX performance. This section contains the following topics: Manage load balancing Set up Performance Monitor counters Tracing Setting processor affinity Tune database settings Manage database logs
213
Microsoft Dynamics AX
Microsoft Dynamics AX
Create a cluster
1. Open the Cluster configuration form (Administration > Setup > Cluster configuration). 2. Press CTRL+N to create a new cluster. 3. Enter a name and description for the cluster. 4. Press CTRL+S to save changes.
4. In the Cluster name field, select the appropriate cluster for the selected AOS instance. 5. Press CTRL+S to save changes.
Microsoft Dynamics AX Use the Microsoft Dynamics AX Configuration utility to change client configurations. For more information, see Managing configurations (Client).
216
Microsoft Dynamics AX
The number of currently active server sessions. The number of bytes received by the Application Object Server (AOS) instance since it started. The number of bytes sent by the AOS instance since it started. The number of client-to-server requests since the AOS instance started. The number of client-to-server requests processed per second by the AOS instance. The number of server-to-client requests processed since the AOS instance started. The total number of active sessions since the AOS instance started.
Total Sessions
217
Microsoft Dynamics AX The following table describes the counters available for the Microsoft Dynamics AX: Enterprise Portal performance object. All Enterprise Portal counters are .NET Business Connector counters. If you call the .NET Business Connector through another application, the same counters can be used.
Counter Description
Number of Sessions
The number of currently active .NET Business Connector sessions. The time in seconds taken to execute and render a Web Part. The number of fatal .NET Business Connector session exceptions. For Enterprise Portal, this means that the page was not rendered. A Windows SharePoint Services error page was displayed to the user.
The number of nonfatal .NET Business Connector session exceptions. For Enterprise Portal, this means that the page was rendered, but some Web Parts on the page were not rendered.
The number of X++ .NET session exceptions. The total number of .NET Business Connector sessions allocated since AOS startup. The total number of .NET Business Connector sessions disposed of since AOS startup. The number of .NET Business Connector sessions allocated per second.
Sessions Disposed
You may also want to monitor counters for the AOS process (Ax32Serv), such as CPU usage, memory usage, handle counts, and thread counts.
218
Microsoft Dynamics AX
Add counters
1. Open the Performance window (Start > Administrative Tools > Performance). 2. Click Add or press CTRL+I. 3. In the Add Counters dialog box, verify that the correct server name appears. 4. Select Select Counters from Computer. 5. In the Performance Object list, select an object to add counters for, such as Microsoft Dynamics AX Object Server. 6. Select all counters for the object, or select individual counters. 7. Click Add, and then click Close.
Set up an alert
1. On the navigation tree of the Performance window, expand Performance Logs and Alerts. 2. Right-click Alerts, and then click New Alert Settings. 3. In the New Alert Settings dialog box, type a name for the new alert, and then click OK. 4. On the General tab of the dialog box for the new alert, add a comment, and then click Add to add a counter to the alert. All alerts must have at least one counter. 5. In the Add Counters dialog box, select a Microsoft Dynamics AX object from the Performance Object list, and then select a counter from the Select counters from list. 6. To add the counter to the alert, click Add. You can continue to add counters, or you can click Close to return to the dialog box for the new alert. 7. In the new alert dialog box, select either Over or Under in the Alert when the value is list, and then enter a threshold value in Limit. 8. Click Apply. The alert is generated when the value for the counter is more than or less than the threshold value (depending on whether you selected Over or Under). 9. In the Sample data every boxes, set the sampling frequency. 10. On the Action tab, set actions to occur every time the alert is triggered. 11. On the Schedule tab, set the start and stop schedule for the alert scan.
219
Microsoft Dynamics AX
Tracing
Microsoft Dynamics AX includes a tracing tool to help you create a performance baseline for your Microsoft Dynamics AX servers. A performance baseline can help you understand when server performance is slow or when you might need to make changes in your configuration to manage server capacity. The topics in this section describe how to set tracing options in Microsoft Dynamics AX and how to read trace files.
Trace from the Server Configuration Utility on a computer running an AOS instance. Trace from the Server Configuration Utility on a computer running an AOS instance. Trace from the Configuration Utility on the client - or For line-by-line tracing only, use the options in the Tools > Options dialog box. This may option may degrade system performance.
Standard troubleshooting
Debugging code
Trace from the Configuration Utility on the client. Trace from the Server Configuration Utility on the AOS.
220
Microsoft Dynamics AX
221
Microsoft Dynamics AX 3. On the Tracing tab, evaluate the type of tracing you need to do, and choose settings.
To do this Select these options
RPC round trips to server X++ method calls, Number of nested calls: 4 SQL statements Allow client tracing on Application Object Server instance
Debug code
RPC round trips to server X++ methods SQL statements Row fetch summary (count and time) Allow client tracing on Application Object Server instance
Deep troubleshooting
All options. Performance may be degraded while all tracing options are on.
4. On the Tracing tab, click Start trace. If the AOS Windows service is running, the trace starts within 15 seconds. If the service is stopped, the trace starts the next time the service is started.
222
Microsoft Dynamics AX 3. On the Tracing tab, evaluate the type of tracing you need to do, and choose settings.
To do this Select these options
RPC round trips to server X++ method calls, Number of nested calls: 4 SQL statements
Debug code
RPC round trips to server X++ methods SQL statements Row fetch summary (count and time) Enable method tracing to client desktop
Deep troubleshooting
All options. Performance may be degraded while all tracing options are on.
4. To start tracing once you have set the options you want, close the Configuration Utility, and restart your Microsoft Dynamics AX client.
AOS trace files AOS settings and SQL settings triggered from client (Allow client tracing on Application Object Server instance is selected) Client method trace triggered from client (Enable method tracing to client desktop is selected)
A new file is created each time tracing is started, or when a new day starts. Note: If you are running frequent traces, be sure to remove or archive unneeded trace files often.
223
Microsoft Dynamics AX
Troubleshooting tracing
This section provides information on troubleshooting issues encountered while tracing.
In the Configuration Utility it appears that a trace is running, but when I look in Windows, the trace is not running
When a trace file reaches its size limit, it is stopped by Windows. The Configuration Utility interface does not synchronize with Windows until you click Stop trace.
When I run more than one client tracing session at a time, my system slows down
Tracing is processing-intensive and space-intensive - we recommend that you do not turn tracing on for more than one client at a time.
When you trace method calls, the values returned are multiples of 2. To determine the actual call depth, divide the value by 2. Note: The call depth is reset to 0 each time a call crosses a tier (calls from the client to the server, or from the server to the client).
224
Microsoft Dynamics AX
Test all tuning changes before implementing them in a production environment. In a test or development environment, make a single change and then test your system's performance before making another change.
225
Microsoft Dynamics AX
Tune connections
The following table lists common connection issues, and some adjustments to try in the Server Configuration Utility.
Symptom Adjustments to try
Results for common queries are returned slowly. Results for ad hoc queries are returned slowly.
Check to see that the appropriate indexes are in place. Decrease the Transaction retry interval value. Increase the Array fetch ahead value.
Tune queries
If queries in the system are running slowly, you may want to change settings for literals, string functions, or hints. Microsoft Dynamics AX no longer uses literals by default in form and report queries, or in complex-join queries.
A developer can override the default use of literals by specifying parameters in their code, or an administrator can override the use of literals in the Server Configuration Utility.
Symptom Adjustments to try
Review the query plan statements sent to SQL Server and consider taking corrective action. Using literals may be one solution. Select Use literals in join queries from forms and reports. Select Use literals in complex joins from X++.
226
Microsoft Dynamics AX
When a string function is included in a query, the optimizer may have to choose a less-thanoptimal access plan, such as a table scan, for retrieving data. If customers do not require the use of mixed case outside Microsoft Dynamics AX and do not use left justification or right justification, these functions are not required and should be turned off. To improve performance, we recommend that all values be stored left-aligned by default.
cursors are used for all user queries unless a cursor has been marked as FOR
and READPAST, hints are added to statements depending on the type of the cursor that an X++ query has produced. No interface is available to modify these hints.
227
Microsoft Dynamics AX
228
Microsoft Dynamics AX
229
Microsoft Dynamics AX
230
Microsoft Dynamics AX
Microsoft Dynamics AX AIF Web services BizTalk adapter Synchronization proxy for Microsoft Project Synchronization service for Microsoft Project
5. Step through the wizard pages and enter the required information for the components you are removing. 6. On the Ready to uninstall page, click Remove.
232
Microsoft Dynamics AX 2. Select the component that you want to remove, and then click Remove. The components that are listed in the following table can be removed.
Option Removes
Selecting this option removes the following components: Client Role Centers and the Enterprise Portal framework Workflow Reporting extensions Debugger Enterprise Portal developer tools Reporting tools .NET Business Connector AIF Web services BizTalk adapter Synchronization proxy for Microsoft Office Project Synchronization service for Microsoft Office Project
This option removes all components that are installed on the local computer. You cannot select to remove individual components. Microsoft Dynamics AX Client Help Files Select this option to remove all Help files in all installed languages. You should not remove Help files unless the client is also being removed. Select this option to remove a specific Application Object Server (AOS) instance. Before you remove an AOS instance, use the Microsoft Dynamics AX Configuration utility to point all clients to a valid AOS instance, or update the shared configuration file. When you remove an AOS instance, it is not automatically removed from the list of batch and load balancing servers. After you uninstall an AOS instance, you must manually delete it by using the Server configuration form or the Cluster configuration form.
233
Microsoft Dynamics AX 3. A message box asks you to confirm that you want to uninstall. To proceed, click Yes.
Application files
Delete the application file directory from the location that you installed it to. Use database server administration tools to delete the database and log files. Delete Web sites by using SharePoint Central Administration. Delete SQL Server Reporting Services objects, such as data sources, reports, and report models by using Reporting Services. Delete the contents of the Microsoft Dynamics AX report folder.
Analysis extensions
Delete SQL Server Analysis Services objects, such as databases, cubes, and models by using Analysis Services.
234