Upload
others
View
15
Download
1
Embed Size (px)
Citation preview
TRAINEE WORKBOOK
Atlas 5.0 for Microsoft Dynamics AX
Advanced upload system.
i
Table of Contents 1 Introduction ................................................................................................................................... 5
1.1 Welcome ................................................................................................................................................................. 5
1.2 About this course .................................................................................................................................................. 5
1.2.1 Course description ................................................................................................................................................................. 5
1.2.2 Audience .................................................................................................................................................................................. 5
1.2.3 Objectives ................................................................................................................................................................................ 5
1.2.4 Pre-requisites .......................................................................................................................................................................... 6
1.3 Classroom Training ............................................................................................................................................... 6
1.4 Training Materials ................................................................................................................................................. 6
2 Atlas upload system overview .................................................................................................... 8
2.1 Outline..................................................................................................................................................................... 8
2.2 Objectives ............................................................................................................................................................... 8
2.3 Walk-through: Atlas Ribbon .............................................................................................................................. 8
2.3.1 Scenario ................................................................................................................................................................................... 8
2.3.2 Understanding the Atlas Ribbon ......................................................................................................................................... 8
2.4 Key points ............................................................................................................................................................. 10
2.5 Quick interaction .................................................................................................................................................. 11
3 Working with the upload system .............................................................................................. 12
3.1 Outline................................................................................................................................................................... 12
3.2 Objectives ............................................................................................................................................................. 12
3.3 What is an upload template? ........................................................................................................................... 12
3.3.1 Outline ................................................................................................................................................................................... 12
3.3.2 Saved templates .................................................................................................................................................................. 13
3.3.3 In-document templates ...................................................................................................................................................... 13
3.4 Walk-through: Running an upload ................................................................................................................. 14
3.4.1 Scenario ................................................................................................................................................................................. 14
3.4.2 Adjust the invoice lines in the workbook ......................................................................................................................... 14
3.4.3 Choosing a template........................................................................................................................................................... 14
3.4.4 Confirmation .........................................................................................................................................................................15
3.5 Walk-through: Mapping a template to a document .................................................................................... 17
3.5.1 Scenario ..................................................................................................................................................................................17
3.5.2 Picking a suitable saved template from a library ...........................................................................................................17
3.5.3 Mapping the document to the template ..........................................................................................................................17
3.5.4 Giving the template a title and inserting in the document ......................................................................................... 18
3.5.5 Creating the named ranges in your document ............................................................................................................. 18
3.5.6 Testing the upload prior to publishing ............................................................................................................................ 19
3.6 Sharing templates ............................................................................................................................................... 20
3.6.1 Outline ................................................................................................................................................................................... 20
3.6.2 Sharing by document ......................................................................................................................................................... 20
Introduction
ii
3.6.3 Saving the template ............................................................................................................................................................ 20
3.6.4 Exporting the saved template............................................................................................................................................ 20
3.7 Lab Exercises ........................................................................................................................................................ 21
3.8 Key points ............................................................................................................................................................. 24
3.9 Quick interaction ................................................................................................................................................. 25
4 Working with upload templates ............................................................................................... 26
4.1 Outline................................................................................................................................................................... 26
4.2 Objectives ............................................................................................................................................................. 26
4.3 Choosing a data source .................................................................................................................................... 27
4.3.1 Outline ................................................................................................................................................................................... 27
4.3.2 Table upload ......................................................................................................................................................................... 27
4.3.3 Journal upload ..................................................................................................................................................................... 27
4.4 Selecting mandatory fields ................................................................................................................................ 27
4.4.1 Outline ................................................................................................................................................................................... 27
4.4.2 System required fields ......................................................................................................................................................... 27
4.4.3 User required fields .............................................................................................................................................................. 28
4.5 Setting defaults .................................................................................................................................................... 28
4.5.1 Outline ................................................................................................................................................................................... 28
4.5.2 Literal values ......................................................................................................................................................................... 29
4.5.3 Number sequences.............................................................................................................................................................. 29
4.5.4 Reference field lookup ......................................................................................................................................................... 29
4.5.5 Line numbers (Incremental) ............................................................................................................................................... 30
4.5.6 Table method calls .............................................................................................................................................................. 31
4.5.7 Parent fields .......................................................................................................................................................................... 31
4.5.8 Child fields ............................................................................................................................................................................. 32
4.6 Walk-through: Creating a Table upload template ....................................................................................... 33
4.6.1 Scenario ................................................................................................................................................................................. 33
4.6.2 Data source selection .......................................................................................................................................................... 34
4.6.3 Choosing template fields .................................................................................................................................................... 34
4.6.4 Mapping the template to the document and setting defaults .................................................................................... 36
4.6.5 Saving the template and performing an upload ........................................................................................................... 40
4.6.6 Additional, required fields resulting from Validation .................................................................................................... 40
4.6.7 Final upload test .................................................................................................................................................................. 43
4.6.8 Making the template simpler by understanding table methods ................................................................................ 44
4.7 Lab Exercises ........................................................................................................................................................ 46
4.8 Key points ............................................................................................................................................................. 50
4.9 Quick interaction ................................................................................................................................................. 51
5 Table upload functions .............................................................................................................. 52
5.1 Outline................................................................................................................................................................... 52
5.2 Objectives ............................................................................................................................................................. 52
5.3 Append function ................................................................................................................................................. 53
Introduction
iii
5.3.1 Outline ................................................................................................................................................................................... 53
5.3.2 Uses for the Append function ............................................................................................................................................ 53
5.3.3 Lab. Exercises ........................................................................................................................................................................ 54
5.4 Update Column function ................................................................................................................................... 57
5.4.1 Outline ................................................................................................................................................................................... 57
5.4.2 Uses for the update Column function.............................................................................................................................. 57
5.4.3 Walk-through: Updating a field ........................................................................................................................................ 58
5.4.4 Lab. Exercises ........................................................................................................................................................................ 62
5.5 Replace function ................................................................................................................................................. 64
5.5.1 Outline ................................................................................................................................................................................... 64
5.5.2 Uses for the Replace function ............................................................................................................................................ 64
5.5.3 Walk-through: Find and Replace ...................................................................................................................................... 65
5.5.4 Lab Exercises ......................................................................................................................................................................... 72
5.6 Key points ............................................................................................................................................................. 74
5.7 Quick interaction ................................................................................................................................................. 75
6 Journal functions ......................................................................................................................... 76
6.1 Outline................................................................................................................................................................... 76
6.2 Objectives ............................................................................................................................................................. 76
6.3 Uses of the Journal function ............................................................................................................................. 77
6.4 Walk-through: Journal upload functions ....................................................................................................... 77
6.4.1 Scenario ................................................................................................................................................................................. 77
6.4.2 Identifying journal data sources for the template ......................................................................................................... 78
6.4.3 Add and subtract fields to suit user and system requirements ................................................................................... 79
6.4.4 Map fields, set defaults and insert as an in-document template ............................................................................... 82
6.4.5 Test the journal upload ...................................................................................................................................................... 84
6.5 Lab. Exercises ....................................................................................................................................................... 86
6.6 Key points ............................................................................................................................................................. 94
6.7 Quick interaction ................................................................................................................................................. 95
7 Matrix style upload ..................................................................................................................... 96
7.1 Outline................................................................................................................................................................... 96
7.2 Objectives ............................................................................................................................................................. 96
7.3 Uses for Matrix uploads ..................................................................................................................................... 97
7.4 Matrix uploads ..................................................................................................................................................... 97
7.4.1 Walk-through: Sales forecast upload ............................................................................................................................... 97
7.4.2 Auto generating date values ........................................................................................................................................... 106
7.4.3 Lab Exercises ....................................................................................................................................................................... 107
7.5 Key points ............................................................................................................................................................ 112
7.6 Quick interaction ................................................................................................................................................ 113
8 Batch tasks................................................................................................................................... 114
8.1 Outline.................................................................................................................................................................. 114
Introduction
iv
8.2 Objectives ............................................................................................................................................................ 114
8.3 Uses for the Batch task list ............................................................................................................................... 115
8.4 Walk-through: Creating and running batch task list .................................................................................. 116
8.4.1 Outline ................................................................................................................................................................................. 116
8.4.2 Creating the batch and adding templates .................................................................................................................... 116
8.4.3 Adding command functions ............................................................................................................................................. 117
8.4.4 Running the batch tasks ....................................................................................................................................................118
8.4.5 Errors during execution and sequence control commands ....................................................................................... 120
8.5 Walk-through: Using the split function ......................................................................................................... 121
8.5.1 Outline .................................................................................................................................................................................. 121
8.5.2 Adjusting the template to select company .................................................................................................................... 121
8.5.3 Setting the split basis ........................................................................................................................................................ 122
8.5.4 Running a batch task list with active splits ................................................................................................................... 122
8.6 Lab Exercises ...................................................................................................................................................... 124
8.7 Key points ........................................................................................................................................................... 127
8.8 Quick interaction ............................................................................................................................................... 128
5
1 Introduction
1.1 Welcome
Training is a vital component of retaining the value of your Atlas investment. Our training keeps you
up-to-date on your solution and helps you develop the skills necessary for you to fully maximize the
value of your investment. Whether you choose to undertake Classroom Training, or download our
Training Materials, there’s a type of training to meet your needs.
1.2 About this course
This course provides you with a general introduction to the Atlas upload system. This introduction
includes:
1.2.1 Course description
This tutor-led course provides students with the knowledge to design and build working templates
for the Atlas upload system. The course focuses on using all the upload functions and demonstrates
each in isolation and in context.
1.2.2 Audience
This course is intended for all students who wish to learn about the Atlas upload system and what it
can do for them. It is expected that students have a good understanding of Microsoft Excel and its
basic features as well as an excellent knowledge of AX2012 and its data structures. A typical persona
would be technical in nature and have a good understanding of data base structures; this might
include: System administrator, System Accountant or X++ developer.
1.2.3 Objectives
The objective of this course is to provide you with the ability to:
Understand and navigate the Atlas ribbon and task panes
Work with the upload system
Work with designing, building and deploying upload templates
Understand Designer and Standard modes of operation
Understand what templates are used for with respect to the upload system
Understand what the purpose of an upload template
Understand the differences between table templates and journal templates
Understand the matrix style of uploads
Understand how to create an upload template
Understand how to select template fields
Understand how to various types of defaulting mechanisms and how to apply them
Understand what is meant by a batch task
Understand how to build a batch list including the use of templates and other batch actions
Understand how you can use a batch list to perform split uploads
Introduction
6
1.2.4 Pre-requisites
Students must have completed the Atlas 5 reporting system course; they must be familiar with
Microsoft Dynamics AX 2012 system and have an excellent understanding of the data structures that
support this version. Students must also have a good knowledge of the basic features of Microsoft
Excel.
1.3 Classroom Training
Classroom Training provides serious, in-depth learning through hands-on interaction. From
demonstrations to presentations to classroom activities, you’ll receive hands-on experience with
instruction from our experts.
1.4 Training Materials
Training Materials allow you to learn at your own pace, on your own time with information-packed
training manuals. We offer a variety of training manuals and user guides, each rich with tips, tricks,
and insights you can refer to again and again:
Atlas Training Workbooks are very detailed training manuals, designed from a training perspective.
These manuals include advanced topics as well as training objectives, exercises and interactions.
Look for a complete list of manuals available from your partner or via the website:
www.atlas4synamicsAX.com.au.
Before you begin please check that you have the following:
You must have a copy of Dynamics AX 2012 installed and working on the CEU company. Or,
A copy of Microsoft Dynamics AX 2012 installed in a VPC with the demonstration company CEU
installed. Or,
Atlas 5.0 installed with connections to the appropriate Microsoft Dynamics AX installation. (If
you are using the VPC with an Atlas differential installed, then this should already be working)
An Atlas client icon on the desktop, configured to point to the training system
Atlas 5.0 training workbooks installed
AX2012 LAB 3.7.1.1 - Append Aussie Cities
AX2012 LAB 4.7.1.1 - Append Forecast model
AX2012 LAB 5.3.3.1 – Append Address Book
AX2012 LAB 5.3.3.2 – Append Customers
AX2012 LAB 5.4.4.1 – Update Customer credit ratings
AX2012 LAB 5.5.4.1 – Replace Customer Item sales forecast
AX2012 LAB 6.5.1.2 – Journal Sales order
AX2012 LAB 7.4.3.1 – Matrix Replace Customer Item allocation forecast
AX2012 LAB 7.4.3.2 – Matrix Replace Customer Item allocation contiguous forecast
AX2012 LAB 8.6.1.1 – Batch Free-text invoice
Atlas 5 completed training workbooks
Introduction
7
AX2012 COMPLETE LAB 3.7.1.1 - Append Aussie Cities
AX2012 COMPLETE LAB 4.7.1.1 - Append Forecast model
AX2012 COMPLETE LAB 5.3.3.1 – Append Address Book
AX2012 COMPLETE LAB 5.3.3.2 – Append Customers
AX2012 COMPLETE LAB 5.4.4.1 – Update Customer credit ratings
AX2012 COMPLETE LAB 5.5.4.1 – Replace Customer Item sales forecast
AX2012 COMPLETE LAB 6.5.1.2 – Journal Sales order
AX2012 COMPLETE LAB 7.4.3.1 – Matrix Replace Customer Item allocation forecast
AX2012 COMPLETE LAB 7.4.3.2 – Matrix Replace Customer Item allocation contiguous forecast
AX2012 COMPLETE LAB 8.6.1.1 – Batch Free-text invoice
Upload data source file and templates:
AX2012 Training Upload.AtlasDataSources
Australian Cities
Zip Codes
Free-text invoice
Demand forecast Total
Demand Forecast Matrix
Accompanying walkthrough templates:
AX2012 WALKTHROUGH 3.4.1 – Free-text invoice
AX2012 WALKTHROUGH 3.5.1 – Select and map template
AX2012 WALKTHROUGH 4.6.1 – Append sales order line
AX2012 WALKTHROUGH 5.4.3 - Update sales pool
AX2012 WALKTHROUGH 5.5.3 - Replace Customer Demand Forecast
AX2012 WALKTHROUGH 6.4.1 – Journal Free-text invoice
AX2012 WALKTHROUGH 7.4.1 – Matrix Replace Customer Demand Forecast
AX2012 WALKTHROUGH 8.4.1 – Batch Append Customers
AX2012 WALKTHROUGH 8.5.1 – Batch Append Multicompany Customers
8
2 Atlas upload system overview
2.1 Outline
The purpose of this chapter is to get you started with the Atlas upload system. This will involve
understanding the Atlas ribbon bar and the task panes so that you can use the upload functions.
This section also introduces the concept of the designer and context modes of operation.
2.2 Objectives
At the completion of this chapter, you will be able to:
Understand the Atlas Ribbon as it applies to the upload system
Understand the two modes of operation; Designer and Context
Understand what is meant by Batch tasks
2.3 Walk-through: Atlas Ribbon
2.3.1 Scenario
You have been asked to give an overview of the Atlas upload system; in terms of what you can
expect to see on the Ribbon bar.
2.3.2 Understanding the Atlas Ribbon
2.3.2.1 Outline
You cannot see the Atlas Ribbon until you open one of the supported Microsoft Office System
applications.1 The ribbon will appear as a tab in that application’s ribbon, thus:
Figure 1 The Atlas 5.0 tab contains the Atlas Ribbon
Click this tab to reveal the ribbon:
Figure 2 The Atlas Ribbon. The Upload group is the part of the ribbon covered in this course
Below is a summary of the Ribbon’s elements
1 Excel, Word, Powerpoint or Outlook
Atlas upload system overview
9
2.3.2.2 Designer and context task pane modes
The Atlas task panes can operate in one of two modes: Context and Designer. By default, the
system starts in Context mode.
In Context mode, you can use the upload functions to send records to Microsoft Dynamics AX.
In designer mode, the task pane is used to build the Atlas upload objects and map them to the
document.
2.3.2.3 Table menu
The Table menu is used to upload records to a single table in Microsoft Dynamics AX. It has three
basic modes of operation:
1. Append
2. Table columns
3. Find and replace
Append is used to add new records to a table, Table columns and Find and Replace are used to
update existing records.
2.3.2.4 Journal button
The Journal button is used to append or add a single record to a header table and one or more
records to a line table. The header and the line tables are linked by a common field. An example of
a journal is the Sales table and sales lines or the ledger journal header and ledger journal line.
2.3.2.5 Template menu
The Template menu is used when you want to build, use and save an upload template without
inserting it into the current document.
2.3.2.6 Batch tasks
This option allows you to daisy-chain many upload templates and then run them in order. Use this
when the task at hand requires you to load data into several Microsoft Dynamics AX tables.
Atlas upload system overview
10
2.4 Key points
This section introduced Atlas. In particular you learned about:
Atlas appears as a Ribbon tab in your Microsoft Office System applications
The ribbon bar functions will be disabled if you have not logged into Atlas. Use the Refresh
ribbon option to activate the ribbon if you log in subsequently
The Atlas upload system functions can be found in the Upload group of the Atlas ribbon bar
Main functions of the upload system are represented by the large buttons on the Atlas ribbon.
Menus beneath each of these, reveal other, available functions
Atlas operates in two modes; designer and context. Context is a runtime mode and allows you
to send records to Microsoft Dynamics AX. Designer mode is used to create templates and to
map the document fields to those in the template
Use the Batch tasks to upload into multiple tables in a set sequence.
Atlas upload system overview
11
2.5 Quick interaction
Take a moment to write down the three key points you have learned:
1.
2.
3.
12
3 Working with the upload system
3.1 Outline
The purpose of this chapter is to get you started with the Atlas upload system. It introduces you to
the concept of upload templates, mapping these templates to your documents, running an upload
and how you can re-use these templates with other documents.
Mapped templates are often saved into the document as in-document templates. It is these that are
used when the upload is executed.
3.2 Objectives
At the completion of this chapter, you will be able to:
Understand what is meant by the term Template
Understand the difference between an in-document template and a saved template
Understand how to use the upload system to get data from your Office document into
Microsoft Dynamics AX
Understand what happens when you start an upload
Understand how to map data in your document to a template
Understand how to edit an in-document template
Recognize error messages
3.3 What is an upload template?
3.3.1 Outline
For all but the simplest of uploads, a template is needed to define both the fields in the target
Microsoft Dynamics AX table and the mapping between these fields and your Microsoft Office
document.
A template serves three purposes:
1. Describes the required fields in the target Microsoft Dynamics AX table in terms of:
a. System requirements. i.e. have all the mandatory fields been included
b. User requirements. i.e. have all the fields the user needs been included
2. Provides a means by which pre-set or default values can be assigned to fields, thus reducing
the amount of data-entry the user has to do, to successfully upload into Microsoft Dynamics
AX. These defaults come in the form of:
a. Pre-set literal values
b. Number sequences
c. Defaults from parent or child records
d. X++ method calls
3. Provides a means to map the Microsoft Office document to the fields in your Microsoft
Dynamics AX system.
Working with the upload system
13
Templates exist in the document or as part of a library of templates saved against the target table in
the data source list.
3.3.2 Saved templates
A saved template is associated with a data source in your data source list. It will contain the fields
and any other settings you supply to it at design time. It will remain disconnected from the
document you are working with, until you choose to insert it. At that point, a copy of the template
will be associated with the document and will be known as an In-document template.
Figure 3 Saved template for the currency table for a document that does not contain in-document templates
3.3.3 In-document templates
In-document templates link a template to the document. Typically, these templates contain
mappings that tell the upload system where to find data in document. In-document templates are
created whenever you insert a saved template into the document. Because of this, you can share
the document with other users and if they have Atlas installed and have suitable access rights, they
can use the upload system to transfer the data from the document into Microsoft Dynamics AX.
Figure 4 In-document template which can be used to load exchange rates
Working with the upload system
14
3.4 Walk-through: Running an upload
3.4.1 Scenario
The upload system brings together a template and an Office document. In most cases, the template
is inserted into the document and can then be used by any Atlas user whenever the document is
opened. In this example, you will choose a template from the data source list that will allow you to
upload a Free-text invoice to record some miscellaneous billing for a customer:
Adjusting invoice lines in the workbook
Choosing a Template
Confirmation
Use AX2012 WALKTHROUGH 3.4.1 – Free-text invoice.xlsx. Ensure that Standard mode is selected.
3.4.2 Adjust the invoice lines in the workbook
Add an extra line to the invoice lines in the workbook:
1. Select cell G12
2. Press the Tab key on your keyboard
3. In cell D13 type 403150 and press Tab
4. In cell E13 type Installation fee and press Tab
5. In cell F13 type 150.00 and press Tab
Figure 5 Free-text invoice with additional line
3.4.3 Choosing a template
Templates which are not in the document, known as Saved templates and can be found under the
target table in the Data source list.
To choose the template, follow these steps:
1. From the Ribbon bar, on the Atlas tab, in the Report options group, ensure that the task pane
mode is Standard
2. From the Ribbon bar, on the Atlas tab, in the Upload group click the Journal button.
3. Click to expand the Customer free text invoice node
4. Tick to select the saved template Free-text invoice
Working with the upload system
15
Figure 6 Saved template is selected and made active.
3.4.4 Confirmation
This step is used to send the records to Microsoft Dynamics AX.
1. Open the Confirmation tab
2. Click to select the Upload button
The records are then validated and uploaded at the same time. New records added are tallied and
shown on the confirmation tab page.
Figure 7 Three records successfully inserted
Furthermore, the template selected will be inserted into the document as an In-document template
and can be seen when you refresh the data source list:
1. Open the Data sources tab
2. From the pull-down menu, choose Tables -> Refresh
The In-document template appears at the top:
In Microsoft Dynamics AX these can be seen on the Free text invoice form (CEU/Accounts
receivable/Common/Free text invoices/All free text invoices):
Working with the upload system
16
Figure 8 Un-posted free-text invoice
Working with the upload system
17
3.5 Walk-through: Mapping a template to a document
3.5.1 Scenario
You understand that for simple tables, you can perform an upload with the need to pre-define a
template. However, as you are learning about templates you want to use a template on the table
that is used to hold City details. There is a template for this but it has no mappings. What you will
do is:
Pick a template defined for this table
Map the template to the document
Change the template title and insert into the document
Attempt the upload
Use AX2012 WALKTHROUGH 3.5.1 – Select and map template.xlsx
Figure 9 Simple table upload
3.5.2 Picking a suitable saved template from a library
Saved templates can be found beneath the table you wish to use. In this case it is the Cities:
1. From the Ribbon bar, on the Atlas tab, in the Upload group click the Table button and select
Append.
2. Click to expand the Cities node
3. Tick to select Australian cities
3.5.3 Mapping the document to the template
Map as follows:
1. Click to select the Append tab
2. Click to select the City field
3. Right-click and choose =Name
4. Click to select the Description field
5. Right-click and choose =Description
6. Click to select the State field
7. Right-click and choose =StateId
Working with the upload system
18
Not all fields in the document have been mapped (notably country / region), these are left with pre-
set, default values:
Figure 10 Template with default named ranges
3.5.4 Giving the template a title and inserting in the document
Unless otherwise named, in-document templates show the table name into which the uploaded
records will be written. To adjust this, do the following:
1. From the Append menu, choose Properties…
2. Enter Add Australian Cities in the Title entry box
3. Enter upload instructions for the user as required. These will appear on the confirmation tab
4. Click OK
5. Click Insert
Step 5 inserts the template into the document. Saving the document at this point will ensure that
the template will remain associated with the document and can be distributed to others for use. The
template will appear as follows:
Figure 11 Re-named in-document template
3.5.5 Creating the named ranges in your document
This document does not contain the named ranges specified on the in-document template, to do
this, select the in-document template and open the Append tab. For each field that has a named
range, choose the corresponding column and assign a corresponding named range
1. Select cell D5
2. Right-click and from the menu choose Select->Table Column Data
3. In the Name box, type Name
4. Select cell E5
5. Right-click and from the menu choose Select->Table Column Data
6. In the Name box, type Description
Working with the upload system
19
7. Select cell F5
8. Right-click and from the menu choose Select->Table Column Data
9. In the Name box, type StateId
3.5.6 Testing the upload prior to publishing Switching back to Standard mode allows to you test the upload. It is good practice to attempt this
into a Test system or Test company before publishing to the user community:
1. From the Ribbon bar, on the Atlas tab, in the Report options group, ensure that the task pane
mode is Standard
2. From the Ribbon bar, on the Atlas tab, in the Upload group click the Table button. Select
Append
3. Ensure Add Australian Cities is ticked
4. Open the Confirmation tab
5. Click Upload
When complete, it he Cities for Australia will include:
Figure 12 Australian Capital cities
Working with the upload system
20
3.6 Sharing templates
3.6.1 Outline
You can share upload templates just like you share queries in the reporting system. For the upload
system, you can share templates as follows:
By sharing the document with the template included
By saving the template with the table
By exporting the saved templates to a text file
3.6.2 Sharing by document
When you save a document that includes an upload template, you can share the template with any
user that opens the document and who has Atlas installed.
3.6.3 Saving the template
You can use the Save as… button to save the template at any stage. This will associate the template
with the data source outside of the document. Whenever you want to use the template, simply
navigate to the table in the data source list and expand its node. Select the template found therein.
3.6.4 Exporting the saved template
Saved templates can be exported to a text file and then shared via email or file system. Select the
template from the table node in the data source list, select Saved query from the menu and choose
Export… An alternative way is to use the right-click -> Export when the template has been selected:
Working with the upload system
21
3.7 Lab Exercises
1. The workbook used to load the Australian cities has been adjusted to include Zip codes. Use
this new workbook to load the Australian cities. You will need to choose the template from
beneath the relevant table in the data source list. You can assume the named ranges exist in
the document. (Use AX2012 LAB 3.7.1.1 - Append Aussie Cities.xlsx).
Challenge yourself!
1. Select Standard mode
2. Open the Table Append function
3. Tick to select Add Australian Cities
4. Upload Cities
Need a little help?
1. From the Atlas ribbon bar, change the mode from Designer to Standard
2. Open the Table function menu from the Atlas Ribbon Bar and choose Append
3. Open the data sources tab if not already open
4. Tick to select the saved template Add Australian Cities
5. Open the Confirmation tab
6. Click to select the Upload button
A confirmation showing the number of records uploaded is shown:
Figure 13 Confirmation of 8 records loaded
And in Microsoft Dynamics AX:
Working with the upload system
22
Figure 14 Australian Capital Cities
Working with the upload system
23
2. The workbook used to load the Australian cities also contains Zip/Post codes. Use this same
workbook to load the Zip/Post codes for the newly loaded Australian cities. You will need to
choose the template from beneath the relevant table in the data source list. You can assume
the named ranges exist in the document. (Use AX2012 LAB 3.7.1.1 - Append Aussie Cities.xlsx).
Challenge yourself!
1. Select Designer mode
2. Open the Table Append function
3. Navigate to the Zip/Postal codes table and select Zip/Postal codes
4. Open the Append tab and map State, City and Zip/Post code fields
5. Insert and change mode to Standard
6. Upload Cities
Need a little help?
1. From the Atlas ribbon bar, change the mode from Standard to Designer
2. Open the Table function menu from the Atlas Ribbon Bar and choose Append
3. Open the data sources tab if not already open
4. Navigate the list and find Zip/Postal codes
5. Expand this node and tick to select Zip/Postal codes
6. Open the Append tab
7. Right-click on the State field and select the suggested named range =State
8. Right-click on the City field and select the suggested named range =City
9. Right-click on the Zip/Postal code field and select the suggested named range =ZipCode
10. Click Insert
11. From the Atlas ribbon bar, change the mode from Standard to Designer
12. Click to select Zip/Postal codes
13. Open the Confirmation tab
14. Click to select the Upload button
A confirmation showing the number of records uploaded is shown as before and the effect in
Microsoft Dynamics AX is as follows:
Figure 15 Post codes for Australian Capital cities
Working with the upload system
24
3.8 Key points
This section introduced the task pane interface of the Atlas upload system and how it can be used
in Standard mode to run an upload. You also learned how to:
Select a template from a library of templates found in the data source list
Apply mappings to a template
All upload functions are designed and run from the task pane interface. Additionally:
Templates hold information about the table into which the upload will be performed
Templates include default settings and business logic
Uploads can be performed by using an in-document template, a saved template or without a
template
Uploads without a template should only be performed when the data requirements are simple
and do not need number sequence definitions, defaults and business logic
When a template is made into an in-document template, you will normally map its fields to
those of the document
Use named ranges aid speed of mapping and portability
All uploads are performed using Standard mode
Designer mode is used to build templates and also the map the template fields
In-document templates can have a title and user instructions
Uploads are validated and any errors are reported using an error reporting window
Validation uses the same table level as that used by Microsoft Dynamics AX.
Templates can be shared between users in a variety of ways
Working with the upload system
25
3.9 Quick interaction
Take a moment to write down the three key points you have learned:
1.
2.
3.
26
4 Working with upload templates
4.1 Outline
For all but the simplest of uploads, a template is needed to define both the fields in the target
Microsoft Dynamics AX table and the mapping between these fields and your Microsoft Office
document.
A template serves three purposes:
1. Describes the required fields in the target Microsoft Dynamics AX table in terms of:
a. System requirements. i.e. have all the mandatory fields been included
b. User requirements. i.e. have all the fields the user needs been included
2. Provides a means by which pre-set or default values can be assigned to fields, thus reducing
the amount of data-entry the user has to do, to successfully upload into Microsoft Dynamics
AX. These defaults come in the form of:
a. Pre-set literal values
b. Number sequences
c. Reference fields
d. Line numbers
e. Defaults from parent or child records
f. X++ method calls
3. Provides a means to map the Microsoft Office document to the fields in your Microsoft
Dynamics AX system.
4.2 Objectives
At the completion of this chapter, you will be able to:
Understand the difference between a Table and Journal style uploads
Understand mandatory fields and how they relate to templates
Understand what is meant by template defaults
Understand the different types of defaults you can use with templates
Understand how to build a template from scratch
Understand the process by which template fields are included
Understand how to map template fields to locations in a document
Working with upload templates
27
4.3 Choosing a data source
4.3.1 Outline
Data sources are the destination for your upload. Depending on the type of upload you are
performing and the nature of the data source itself, you might need to select whether the table is a
header or line in connection to the upload.
Note, you might need to upload into several tables in order to complete a given upload task. E.g. Customer
upload
4.3.2 Table upload
Simply select the table for which you want to prepare a template. The simplest tables do not need a
template, instead you can upload to the table directly and Atlas will create a document template
when choose Upload.
4.3.3 Journal upload
Use the Journal upload functions to post the transactions that you would normally enter using the
journal forms inside Microsoft Dynamics AX. Journal templates will post a single header record and
one or more line records. To create a journal upload template, you need to choose the header
table in the data source list and also the lines table from the list too.
4.4 Selecting mandatory fields
4.4.1 Outline
By default, when you select a table in the data source list, Atlas presents you with a list of fields from
that table’s Auto-report group. This list may or may not contain all of the mandatory fields.
Add and subtract fields as necessary by using the Fields button on the upload function’s data tab.
Figure 16 Fields button on the Append tab
4.4.2 System required fields
These are system mandatory fields; if they are left blank then an error will result upon upload. You
must include all mandatory fields in all append type upload operations. You can determine system
mandatory fields by:
Inspecting the data dictionary for the table in the Microsoft Dynamics AX AOT
Working with upload templates
28
Use Atlas in Standard mode and select the table in Table Append. The field list will show all
mandatory fields with a red underline.
4.4.3 User required fields
These are fields the user needs as a part of the upload. The system will not reject blank records in
this case.
4.5 Setting defaults
4.5.1 Outline
A major reason for using templates is that they provide a mechanism for you to provide defaults to
the upload process. These defaults can be used to reduce the input burden on the end user in the
upload document. Defaults are applied at a template field level and are accessed through the
Properties window.
There are seven default mechanisms, each of which is described below:
Literal values
Number sequences
Reference field lookups
Line numbers
Table method calls
Parent fields
Child fields
The Properties window deals with defaults through the Field Type, Default value fields, and X++
Table methods, highlighted:
Figure 17 Entry boxes used with setting defaults
Working with upload templates
29
4.5.2 Literal values
Literal values are pre-set values you wish to apply to a given field in the template. For example, as
part of a customer upload you may choose to pre-set the language for all US customers as en-us:
4.5.3 Number sequences
Number sequences are an essential part of the Microsoft Dynamics AX system. They are unique
codes, generated by Microsoft Dynamics AX, at time of data entry. Atlas fully supports these
sequences and will generate the unique codes in the same way as that used by Microsoft Dynamics
AX. You can define which number sequence you want to use for each field.
In the following example using the Global Address Book table, you can see that the PartyId is using
the sequence Glob_2:
4.5.4 Reference field lookup
This default method is used when you wish to use information from a related table during the
upload. It is different from the Parent and Child default methods described below as the table may
not be a parent or child actor and are used primarily with journal uploads. This technique however,
is most useful when you need to derive a record id for the target table but you have another key,
Working with upload templates
30
such as a code, to a related table. For example, the sales recipient field on the Free-text invoice
table:
In the above example, the Personnel number is found in named range Worker. Using this, value,
Atlas reads the HcmWorker table and returns the RecId; the value of which is needed on the Free-
text invoice table.
4.5.5 Line numbers (Incremental)
Some upload tasks require a line number field to be incremented for each record loaded. Typically,
these uploads will be transactional in nature and include Sales orders, Budgets, General ledger
journals as examples. Using this feature, you do not need to include a sequence number in your
document, as Atlas will allocate a line number upon upload. Here is an example from the free-text
invoice journal:
Figure 18 Use a value of 1 as a basis for the first line
Working with upload templates
31
4.5.6 Table method calls
Method calls are used when you want Microsoft Dynamics AX to pre-set one or more entries for
you. These methods are the standard methods available on the table, but will also include custom
methods built by you for that table. As a general rule, the methods with INIT as part of the name
are useful for this purpose. Not all methods can be used by Atlas; there are limitations as follows:
Optional parameters are not allowed. If parameters are required, then they must be defaulted
by Microsoft Dynamics AX.
All methods must not return a value.
If the method uses field values from the target table then these must be populated previously
as a part of the upload.
In the following example, based on the Demand Forecast table, you can see that once the customer
account is set, the table method InitFromCustTable is called:
When this method is called, the following fields are automatically set by Microsoft Dynamics AX:
Customer group
Tax group
Comment, set to the name of the customer
Currency
Default dimensions from the inventory item table
4.5.7 Parent fields
This method of default is used with journal uploads only. It allows you to select a value from a
parent or header record. An example of this is a journal number generated at a header level and
then applied to each line record.
In the following example, based on the ledger journal table and ledger journal lines, you can see
that for the Journal number field in the lines table, the Field type is Parent field list and the Default
value is name of the field from the header record from which the value for this field will be drawn. In
this case, the journal number is generated once and its value is cascaded down to the line records.
Working with upload templates
32
4.5.8 Child fields
This default method is similar in nature to that of the Parent field list in that the value is drawn from
a related table in the journal upload process. In this case a child table. Use this method in the
following circumstances:
Asset journals
Project cost journals
Inventory dimension allocation
The following example demonstrates its use with Inventory dimension allocation on the Demand
Forecast table:
In this case choose the field on the child table that will give you the result you need for the related
field in the main table.
Working with upload templates
33
4.6 Walk-through: Creating a Table upload template
4.6.1 Scenario
You wish to demonstrate the building of an upload template from scratch and want highlight the
use of the various default settings. To do this you will use the Customer table as a basis, but for
simplicity of the exercise you can assume that the corresponding address book records are in place.
The steps need to do this include:
Data source selection
Choosing mandatory and other required fields
Mapping the template to the document
Setting defaults
Inserting the template into the document and performing the upload
Adding additional fields
The above series of steps can be viewed as a flowchart shown here, you should note, some steps
are iterative in nature:
Start
Select data source
Include system mandatory fields
All fields included?
Include user required fields
All user fields included?
Map document to template
Set defaults for non-mapped fields
Test upload to AX
Success?
Add system required field
Yes
No
No
Yes
No
End
Yes
Use AX2012 WALKTHROUGH 4.6.1 – Append sales order line template.
Working with upload templates
34
Here is an example of the document:
Figure 19 Add lines to a selected sales order
4.6.2 Data source selection
Select the Sales order lines as the basis for the template:
1. From the Atlas ribbon bar, change the mode form Standard to Designer
2. From the Atlas ribbon bar, select the Table button and choose Append from the menu
3. Tick to select the Order lines node
4. Open the Append tab
4.6.3 Choosing template fields
4.6.3.1 Outline
At this stage it is necessary to understand what are the system required fields and the fields
required by you as a user to achieve a successful upload. In this example, there are four system
mandatory fields: Currency, Customer account, customer group and requested ship by date. From a
user’s perspective, the following fields are required: Item, unit, quantity, price and line amount.
Note: You can determine the system mandatory fields by inspecting the table in the AOT or by viewing the red-
underlined fields for the table in the Append tab when in Standard Mode.
4.6.3.2 Selecting AOT mandatory fields
The Append tab appears as follows, it shows the Auto-report fields as a default. Of these only the
Currency field is an AOT mandatory field:
Working with upload templates
35
Figure 20 Auto-report fields are shown as a starting point
Choose the other mandatory fields as follows:
1. Click the Fields button
2. When the Add or modify report columns task pane appears, expand the Available fields node
and navigate the list until you find Customer (Green plus adjacent). Tick to select this field
3. Navigate the list until you find Group (Green plus adjacent). Tick to select this field
4. Navigate the list until you find Requested ship by date. Tick to select this field
5. Click OK to copy your selections into the list task pane
The field list appears as follows:
Figure 21 Adding in mandatory fields
4.6.3.3 User required fields
In this case, the user required fields are those that are visible in the document. Check that the list of
fields in the Append pane include all the fields you need to upload from the sheet. In this example,
the additional fields include: Requested receipt date and Sale category.
Working with upload templates
36
Add these as follows:
1. Click the Fields button
2. When the Add or modify report columns task pane appears, expand the Available fields node
3. Navigate the list until you find Line number2. Tick to select this field
4. Navigate the list until you find Requested receipt date. Tick to select this field
5. Navigate the list until you find Sales category. Tick to select this field
6. Navigate the list until you find Text. Tick to select this field
7. Navigate the list until you find Unit. Tick to select this field
8. Click OK to copy your selections into the list task pane
The field list is as follows at this stage:
Figure 22 Order line template incorporating user and AOT required fields
4.6.3.4 Fields not needed in the upload
You can remove these at this stage. To do this, use the Fields button at the top of the form and un-
tick each of the fields that you do not need.
4.6.4 Mapping the template to the document and setting defaults
4.6.4.1 Outline
Having established the fields you think you need, it is now time to determine where the data for
each field will come from. Decide whether the data be provided by the user from the worksheet or
whether will it be defaulted in some fashion through the template.
2 Although not shown in the workbook, line number is to be used to sequence the new line in the sales order
Working with upload templates
37
4.6.4.2 On sheet selections
Candidate fields for this treatment are those found in the workbook; values the user can change. It
is often a good idea to create named ranges to reference these sheet locations, as they are readily
used by the Atlas upload system.
1. Click to select the Append tab
2. Click to select the Sales order field
3. Right-click and choose =SalesId
4. Click to select the Item number field
5. Right-click and choose =ItemId
6. Click to select the Quantity field
7. Right-click and choose =SalesQty
8. Click to select the Unit price field
9. Right-click and choose =SalesPrice
10. Click to select the Net amount field
11. Right-click and choose =LineAmount
12. Click to select the Requested shipping date field
13. Right-click and choose =ShippingDateRequested
14. Click to select the Line number field
15. Right-click and choose =LineNum
16. Click to select the Requested receipt date field
17. Right-click and choose =ReceiptDateRequested
18. Click to select the Unit field
19. Right-click and choose =SalesUnit
20. Click to select the Text field
21. Right-click and choose Properties…
22. In the Value entry box type =Text
23. Click Apply
24. Close the Properties… window
The mapped template appears as follows:
Working with upload templates
38
Figure 23 User entered values are found in the cells identified by the named ranges
Note: The named ranges used in this template are available in the document
4.6.4.3 Setting default values
For those un-mapped template fields, set a value to be used at time of upload.
1. Click to select the Currency field
2. Right-click and choose Properties…
3. Type USD in the Value entry box
4. Click the Next button until the Line status field appears
5. Click the Lookup button to show a list of options
6. Tick to select Backorder and the click the Select line button
7. Click OK
8. Click the Next button until the Customer field appears
9. Select Reference field from the Field type drop-down
10. Click the Table refresh button
11. Click the Table name drop-down and select SalesTable
12. Click the Calculated field drop-down to select the field that contains the value you want to use.
In this case CustAccount
13. Click the Filter drop-down to select the SalesId field
14. Click the green plus button to add this field to the Filter expressions grid
15. Click to select the Sales order row in the grid
16. In the Criteria column type =SalesID
17. In the X++ Table methods entry box, Click the Lookup button to show a list of options
18. Navigate the list until you find InitFromCustTable. Tick to select this field
Working with upload templates
39
19. Click OK
20. Click the Next button until the Group field appears
21. Select Reference field from the Field type drop-down
22. Click the Table refresh button
23. Click the Table name drop-down and select SalesTable
24. Click the Calculated field drop-down to select the field that contains the value you want to use.
In this case CustGroup
25. Click the Filter drop-down to select the SalesId field
26. Click the green plus button to add this field to the Filter expressions grid
27. Click to select the Sales order row in the grid
28. In the Criteria column type =SalesID
29. Click the Next button until the Sales category field appears
30. Select Reference field from the Field type drop-down
31. Click the Table refresh button
32. Click the Table name drop-down and select EcoResSalesCategoryExpanded
33. Click the Calculated field drop-down to select the field that contains the value you want to use.
In this case RecId
34. Click the Filter drop-down to select the Name field
35. Click the green plus button to add this field to the Filter expressions grid
36. Click to select the Name row in the grid
37. In the Criteria column type =Name
38. Click Apply
39. Close the Properties… window
The completed template appears as follows:
Working with upload templates
40
Figure 24 Order lines template mapped with default settings
4.6.5 Saving the template and performing an upload
Once the template is completed it can be saved and used to test the upload.
1. Click Insert
2. From the Ribbon bar, on the Atlas tab, in the Report options group, ensure that the task pane
mode is Standard
3. From the Ribbon bar, on the Atlas tab, click the Table button and select Append
4. Tick to select the Order lines document template
5. Open the Confirmation tab
6. Click to select the Upload button
This results in errors. This is because there are other fields that are needed to be set before a
successful can be achieved.
4.6.6 Additional, required fields resulting from Validation
4.6.6.1 Outline
Microsoft Dynamics AX uses methods to set specific values on tables when it creates records. Atlas
cannot always use these methods and as such some uploads will fail because these fields are
missing. These can be considered as mandatory fields, but which are not marked as such in the
AOT. In the case of order lines, there are additional fields to be included in the template:
Type
Ordered Quantity
Physical sales quantity remaining
Physical inventory quantity remaining
Price unit
Mode of delivery
Working with upload templates
41
Inventory dimension
Whenever inventory dimensions are involved, it is usually good practice to include the field in your
template. The other fields are included based on messages from the upload or by examining the
results in Microsoft Dynamics AX.
4.6.6.2 Including the additional fields and setting defaults
Include these fields as follows:
1. From the Ribbon bar, on the Atlas tab, in the Report options group, ensure that the task pane
mode is Designer
2. From the Ribbon bar, on the Atlas tab, click the Table button and select Append
3. Tick to select the Order lines document template
4. Open the Append tab
5. Click the Fields button
6. When the Add or modify report columns task pane appears, expand the Available fields node
7. Tick Show system names
8. Navigate the list until you find Quantity (QtyOrdered). Tick to select this field
9. Navigate the list until you find Deliver remainder (RemainInventPhysical). Tick to select this field
10. Navigate the list until you find Deliver remainder (RemainSalesPhysical). Tick to select this field
11. Navigate the list until you find Price unit (PriceUnit). Tick to select this field
12. Navigate the list until you find Type (SalesType). Tick to select this field
13. Navigate the list until you find Mode of delivery (DlvMode). Tick to select this field
14. Navigate the list until you find Dimension (InventDim). Tick to select this field
15. Click OK
The field list appears as follows:
Working with upload templates
42
Figure 25 Additional fields added without defaults or mapping
4.6.6.3 Mapping and defaults for additional fields
As with the all fields added to a template, define where the data for these fields is to come from;
map to locations in your document or default using the default options described above:
1. Ensure the Append tab is open
2. Click to select Deliver remainder
3. Right-click and choose Properties…
4. Type =SalesQty in the Value entry box
5. Click the Next button until the Deliver remainder field appears
6. Type =SalesQty in the Value entry box
7. Click the Next button until the Dimension No. field appears
8. Type 00000070_0693 in the Value entry box
9. Click the Next button until the Mode of delivery field appears
10. Type 104 in the Value entry box
11. Click the Next button until the Price unit field appears
12. Type 1 in the Value entry box
13. Click the Next button until the Quantity field appears
3 Site 2, Warehouse 21. Refer to the Inventory dimension handling in section x.x.x for more detail on how to generate this number from a
combination of site, warehouse, batch, serial number, configuration etc
4 Default value. Normally default from Sales order table
Working with upload templates
43
14. Type =SalesQty in the Value entry box
15. Click the Next button until the Type field appears
16. Click the Lookup button to show a list of options
17. Tick to select Sales and the click the Select line button
18. Click OK
19. Click Apply
20. Close the Properties… window
The completed template appears as follows:
Figure 26 Order lines template with mapped fields
4.6.7 Final upload test
Update the template and re-try:
1. Click Update
2. From the Ribbon bar, on the Atlas tab, in the Report options group, ensure that the task pane
mode is Standard
3. From the Ribbon bar, on the Atlas tab, click the Table button and select Append
4. Tick to select the Order lines document template
5. Open the Confirmation tab
6. Click to select the Upload button
Working with upload templates
44
4.6.8 Making the template simpler by understanding table methods
Much of the work in building this template is associated with identifying and adding required fields
to the template. Defaulted fields require you to understand where the value is to be sourced from
and then build relations so that this data can be included. This template for example, can be
simplified by the addition of an Atlas method call to the standard method calls on the table. The
Atlas method calls the InitFromSalesTable which results in a much reduced set of fields in the
template:
Figure 27 Reduced template because of the Atlas method
Call the method when the Sales order number is known:
The Atlas method is on the order lines table and calls a standard method:
Working with upload templates
45
Figure 28 Using the sales order number, find the sales order record and pass this to the standard method on the order lines
Working with upload templates
46
4.7 Lab Exercises
1. You want to try uploading data into the demand forecast table. You have a simple demand
forecast based on a selected customer. Build a template that takes advantage of on-sheet
selections and defaults available through the Atlas upload system. Specifically you will use table
methods and literal values. (Use AX2012 LAB 4.7.1.1 - Append Forecast model.xlsx).
Challenge yourself!
1. Select designer mode
2. Open the Table Append function
3. Select the demand forecast table
4. Adjust Auto-report fields to suit the workbook
5. Map template fields to named ranges. Use range suggestions from right-click menu
6. Set the model to default to 100
7. Apply table methods that initialize from the customer and item tables
8. Link in Inventory dimension table
9. Select Standard mode
10. Upload forecast
Need a little help?
1. From the Atlas ribbon bar, change the mode from Standard to Designer
2. Open the Table function menu from the Atlas Ribbon Bar and choose Append
3. Open the data sources tab if not already open
4. Tick to select the Demand Forecast
5. Click the Append tab
6. Click to select the Append: Demand forecast
7. Click the Fields button
8. Un-tick all but the Company, Item number, Model, Quantity, Customer account and Date
9. Click Apply
10. Click to expand the Available fields node
11. Navigate the available fields list. Tick to select the Comments field
12. Navigate the available fields list. Tick to select the Dimension No. field
13. Click the green plus next to the Dimension No. field to include Inventory dimensions
14. Click to expand the Available fields beneath the Inventory dimension node
15. Tick to include Site, Warehouse, Configuration, Dimension No., Size and Color fields
16. Click OK
Working with upload templates
47
Figure 29 Fields from the demand forecast in the template
17. Click to select the Item number field
18. Right-click and choose =ItemId
19. Click to select the Date field
20. Right-click and choose =StartDate
21. Click to select the Quantity field
22. Right-click and choose =SalesQty
23. Click to select the Customer account field
24. Right-click and choose =CustAccountId
25. Click to select the Comments field
26. Right-click and choose =Comment
27. Click to select the Color field
28. Right-click and choose =InventColorId
29. Click to select the Configuration field
30. Right-click and choose =ConfigId
31. Click to select the Site field
32. Right-click and choose =InventSiteId
33. Click to select the Size field
34. Right-click and choose =InventSizeId
35. Click to select the Warehouse field
36. Right-click and choose =InventLocationId
Working with upload templates
48
Figure 30 Mapped fields showing named ranges from the document
37. Click to select Model
38. Right-click and choose Properties…
39. Type 100 in the Value entry box
40. Click the > (Next) button until the Item number field appears
41. In the X++ Table methods entry box, Click the Lookup button to show a list of available methods
42. Navigate the list until you find InitFromInventTable. Tick to select this field
43. Click OK
44. Click the > (Next) button until the Customer account field appears
45. In the X++ Table methods entry box, Click the Lookup button to show a list of available methods
46. Navigate the list until you find InitFromCustTable. Tick to select this field
47. Click OK
48. Click the > (Next) button until the Dimension No. field appears
49. Click to select Child field list from the Field type drop-down
50. Click the Lookup button in the Value entry box and tick to select InventDimId field
51. Click OK
52. Click the > (Next) button until the Color field appears
53. Tick to select Is unique
54. Click the > (Next) button until the Configuration field appears
55. Tick to select Is unique
56. Click the > (Next) button until the Site field appears
57. Tick to select Is unique
58. Click the > (Next) button until the Size field appears
59. Tick to select Is unique
60. Click the > (Next) button until the Warehouse field appears
61. Tick to select Is unique
62. Click Insert to make the template a document template
Working with upload templates
49
Figure 31 Template is finished and is an in-document template
63. From the Atlas ribbon bar, change the mode from Designer to Standard
64. Open the Table function menu from the Atlas Ribbon Bar and choose Append
65. Tick to select the Demand Forecast as a document template
66. Click the Confirmation tab
67. Click Upload
The following is the result in Microsoft Dynamics AX:
Figure 32 Note the inclusion of item group and unit, not included in the template
Working with upload templates
50
4.8 Key points
In this chapter you learned that templates serve three purposes:
A mechanism to define the fields necessary to complete and upload, these fields can be:
o Mandatory from the AOT perspective
o Mandatory from the user’s perspective, or
o Assumed as required by the Microsoft Dynamics AX business logic
Provide a means by which default values can be assigned. Defaults being derived from:
o Literal values set against a field in the template
o Number sequences
o Parent fields
o Child fields
o Incremental values
o Reference fields
o X++ table methods
A means by which fields in the template can be mapped to locations in the document in which
upload data can be retrieved
Literal values are pre-set by the template designer. E.g. setting a language
The number sequence default uses the nominated number sequence code to generate a code
a time of upload. E.g. Sales order number
Parent field is used with journal lines and allows you select a header field from which the value
will be substituted
Child field list used with journal lines and allows a value from a sub-ordinate table to be
included in the selected field. E.g. Inventory dimension
Incremental values manage counter automatically. E.g. Line numbers
Use Reference fields when you want to return the value from a nominated field on a different
table. This kind of default required a filter to be set up to define the relationship between the
two tables
X++ table methods allow you to call Microsoft Dynamics AX code upon upload. This code then
populates values without having to include those values in the template or the document.
Sometimes X++ methods need a wrapper in order for Atlas to take advantage of them
Mapping generally involves using named ranges to provide the between template and
document
Table upload templates involve a single table or a table with a sub-ordinate
Journal upload templates involve a header table and a linked lines tables. You define the
linkage
Candidate journal templates involve tables in the AOT that are defined as Worksheet header
and Worksheet line. E.g. Sales orders
Working with upload templates
51
4.9 Quick interaction
Take a moment to write down the three key points you have learned:
1.
2.
3.
52
5 Table upload functions
5.1 Outline
The table upload functions are used to enter records into Microsoft Dynamics AX tables. These will
typically be budgets and new records for main table and the like. You can also use the upload
functions to amend existing columns of a table, for example adjusting the credit limit for a range of
customers. A replace function is available which deletes records and then appends new records as a
replacement for the deleted ones.
You should note that these functions respect the access settings for the tables in Microsoft
Dynamics AX. This means that if update or append is not allowed as prescribed by Microsoft
Dynamics AX (for example transaction tables) then you will not be able to use the upload functions
of Atlas on these tables either.
5.2 Objectives
At the end of this chapter, you will be able to:
Identify the three upload functions of:
o Append
o Update
o Replace
Understand how each of these three upload functions are built and used
Understand how to edit uploads that use these functions
Understand how to use these functions with other Atlas functions
Table upload functions
53
5.3 Append function
5.3.1 Outline
The Append function adds one or more records to a Microsoft Dynamics AX data source. This is the
simplest of the Table upload functions as no additional filter criteria needs to be applied.
5.3.2 Uses for the Append function
You use the Append function in the following instances:
During implementation, use this to load new, main table and setup data into Microsoft
Dynamics AX. For example, customers, vendors, dimensions and items
When budget transactions are to be loaded into a new model
When the loading of new records using the Microsoft Dynamics AX client would take longer
than using the Atlas upload system
Table upload functions
54
5.3.3 Lab. Exercises
1. Your investigations so far have given you a good understanding of the Table Append function.
However, in preparation for investigation into the other features, you will need to load a list of
new customers. To do this you will first load the address book detail which holds the party’s
name. (Use AX2012 LAB 5.3.3.1 – Append Address Book.xlsx)
Challenge yourself!
1. Ensure task pane mode is Designer
2. Open the Table Append task pane
3. Select Address book
4. In the Append tab, add Search name
5. Map fields to document using suggested named ranges
6. Assign en-us as the default language
7. Insert the template
8. Upload the records
Need a little help?
1. Open the Table Append function from the Atlas Ribbon Bar
2. From the Atlas ribbon bar, change the mode from Standard to Designer
3. Tick to select Address book
4. Open the Append tab
5. Click to select the Append: Address book
6. Click the Fields button
7. Click to expand the Available fields node
8. Navigate the available fields list. Tick to select the Search name field
9. Click OK
10. Click to select the Name field
68. Right-click and choose =Name
11. Click to select the Party ID field
12. Right-click and choose =PartyNumber
13. Click to select the Search name field
14. Right-click and choose =NameAlias
15. Click to select the Language field
16. Right-click and choose Properties…
17. Type en-us in the Value entry box
18. Click Apply
19. Close the Properties window
20. Click Insert
21. From the Atlas ribbon bar, change the mode from Designer to Context
22. Open the Table Append function from the Atlas Ribbon Bar
23. Ensure Address book is ticked
24. Open the confirmation tab
25. Click Upload to import the records
Table upload functions
55
The records loaded are not visible in Microsoft Dynamics AX at this stage, but are present in the
Address book table. Linking the customers to these records will reveal them.
2. Use a number sequence code to assign the customer number but use the party id to provide
the necessary link between the address book and the customer record. (Use AX2012 LAB 5.3.3.2
– Append Customers.xlsx)
Challenge yourself!
1. Ensure task pane mode is designer
2. Open the Table Append task pane
3. Choose Customers
4. On the Append tab, remove National registry number and add credit rating and credit limit fields
5. Assign number sequence AR_001 to customer code
6. Use the Party number to return the record id of the address book record
7. Set defaults of USD for currency and 10 for Group
8. Map credit rating and credit limit to named ranges
9. Insert template
10. Perform upload and check for customer records in Microsoft Dynamics AX
Need a little help?
1. Open the Table Append function from the Atlas Ribbon Bar
2. From the Atlas ribbon bar, change the mode from Standard to Designer
3. Tick to select Customers
4. Open the Append tab
5. Click to select the Append: Customers
6. Click the Fields button
7. Un-tick National Registry Number
8. Click to expand the Available fields node
9. Navigate the available fields list. Tick to select the Credit limit field
10. Navigate the available fields list. Tick to select the Credit rating field
11. Click OK
12. Click to select Credit limit field
13. Right-click and choose =CreditMax
14. Click to select the Credit rating field
15. Right-click and choose =CreditRating
16. Click to select the Customer account field
17. Right-click and choose Properties…
18. Tick to select Number sequence
19. Type AR_001 in the Value entry box
20. Select Per line from the New Voucher drop-down list
21. Click the > (Next) button until the Name field appears
22. Select Reference field from the Field type drop-down
23. Click the Table refresh button
24. Click the Table name drop-down and select DirPartyTable
Table upload functions
56
25. Click the Calculated field drop-down to select the field that contains the value you want to use. In this case
RecId
26. Click the Filter drop-down to select the PartyNumber field
27. Click the green plus button to add this field to the Filter expressions grid
28. Click to select the Party number row in the grid
29. In the Criteria column type =PartyNumber
30. Click the > (Next) button until the Currency field appears
31. Type USD in the Value entry box
32. Click the > (Next) button until the Customer group field appears
33. Type 10 in the Value entry box
34. Click Apply
35. Close the Properties… window
36. Click Insert
37. From the Atlas ribbon bar, change the mode from Designer to Standard
38. Open the Table Append function from the Atlas Ribbon Bar
39. Ensure Customers is ticked
40. Open the confirmation tab
41. Click Upload to import the records
Here is an example of the loaded records inside Microsoft Dynamics AX:
Table upload functions
57
5.4 Update Column function
5.4.1 Outline
This function is used to update one or more columns in a table with values found in the source
document. The records selected for update are defined using a Filters tab page. The template used;
saved or in-document must nominate the fields that uniquely identify a single record in the
Microsoft Dynamics AX table. These unique fields must be part of the filter and must be marked as
unique in properties form for these fields. Normally, the unique field will be a code like Customer
account, Item id, Vendor account or Project, but might include a compound key.
5.4.2 Uses for the update Column function
The Column update function is used in the following instances:
Where you want to adjust the value of one or more fields in a table of Microsoft Dynamics AX
There are many records to be adjusted meaning the use of the Microsoft Dynamics AX client
and associated table forms would be prohibitive
Where the column adjustment does not change prior, reported values. In this case a journal or
other transactions postings should be used.
Where a property of a record was missed or was not available during upload and needs to be
added subsequently.
In conjunction with Atlas reporting functions to list and adjust values iteratively.
Table upload functions
58
5.4.3 Walk-through: Updating a field
5.4.3.1 Scenario
Because the information was not available at the time of loading, the new customers you did not
include a Sales pool code; an attribute necessary for some specific reporting used by the sales team.
You need to be able to modify these existing records with this attribute. You must browse the
template library for a suitable template to assist you in this exercise.
In this scenario, the following will be done:
Build a list report to account for the customers that need to be updated
Identify, select and map update template
Define named ranges for each column of this list
Confirmation
Use AX2012 WALKTHROUGH 5.4.3 - Update sales pool.xlsx as a basis for this exercise.
5.4.3.2 Build a list report of customers to be updated
The following is an example of the table that can be used as a starting point for the update:
Figure 33 Empty workbook
Using this as the basis:
1. Select cell D4
2. From the Ribbon bar, on the Atlas tab, in the Reporting group click the Structured drop down
menu beneath the Summary button
3. Select List from the menu shown
4. Tick to select the Customers in the data source list
5. Select Filters and click to select the Customer group row in the grid
6. Enter 10 Into the Range entry box
7. Select Style : List
8. Click to select the Report Columns (Customers) node
9. Click the Add/Remove fields button
10. When the Add or modify report columns task pane appears, un-tick all but the Customer
account fields
11. Click to select the green plus adjacent to the Name field
Table upload functions
59
12. Expand the Available fields node beneath the address book node and navigate the list until you
find Name. Tick to select this field
13. Click Apply
14. Expand the Available fields node beneath the Customers node and navigate the list until you
find Sales order pool. Tick to select this field
15. Click OK
16. Click Insert
17. From the Ribbon bar select Table tools : Design
18. Choose table style : Light 3
19. Select cell F6
20. Enter 10 and copy down to cell F10
The table appears as follows:
Figure 34 Completed list report
5.4.3.3 Building the update template
You will need to choose the Table columns function to do this:
1. From the Atlas ribbon bar, select the Table button and choose Table columns from the menu
2. Tick to select the Customers table from the list of data sources
3. Open the Filters tab
4. Ensure that the Customer account row has =AccountNum as a criteria value
5. Open the Table columns tab
6. Click to select the Customer Account row
7. Right-click and select =AccountNum
Table upload functions
60
8. Click the Fields button
9. Un-tick all but the Customer account field
10. Click to expand the Available fields node
11. Navigate the list until you find Sales order pool. Tick to select this field
12. Click OK
13. Click to select the Sales order pool row
14. Right-click and select =SalesPoolId
15. Click Insert
The task pane appears as follows:
5.4.3.4 Mapping the document to the template
Use named ranges to tell the upload system where to find data:
1. Select cell D6
2. Right-click and from the menu choose Select->Table Column Data
3. In the Name box, type AccountNum
4. Select cell F6
5. Right-click and from the menu choose Select->Table Column Data
6. In the Name box, type SalesPoolId
5.4.3.5 Performing the upload
Send the update request to Microsoft Dynamics AX:
1. From the Atlas ribbon bar, change the mode form Designer to Standard
2. Open the Confirmation tab
3. Click Upload
Table upload functions
61
The records in the customer table will be updated and the confirmation page will indicate that three
records have been updated, thus:
Figure 35 Upload indicates that 22 records were updated successfully
In Microsoft Dynamics AX this is seen by looking at the field in the customer table:
Figure 36 Lion Sales now has the sales order pool of 10
Table upload functions
62
5.4.4 Lab. Exercises
1. Credit management is important in most sales organizations. Periodically these are reviewed
and adjusted accordingly. Use the atlas upload system to manage the credit limits and ratings
of a list of customers. You have prepared a workbook that includes an Atlas list report to show
customers, their credit rating and their balance. You can adjust this credit figures in this list and
then use the Table update function to reflect those adjustments in Microsoft Dynamics AX. In
this exercise, change the credit rating for the all accounts to “Good” and set a limit of $2000 for
each. (Use AX2012 LAB 5.4.4.1 – Update Customer credit ratings.xlsx)
Challenge yourself!
1. Refresh the report using the option on the Atlas ribbon bar
2. Change credit rating and limits for ALL customers
3. Switch from Context to Designer mode
4. Open the Table columns function and tick to select the customers table
5. Open the Filters page and choose the named range AccountNum for Customer account
6. Open the Table columns tab and un-tick all but the customer account field
7. Include the credit limit and rating and map named ranges to appropriate fields
8. Click Insert (name is the default field for this data source)
9. Run the upload, close the workbook
10. Re-open and refresh
Need a little help?
1. From the Atlas ribbon bar, click to select the refresh button
2. Change the credit rating and credit limits for ALL accounts. Make the rating is Good and the limit $2000
3. From the Atlas ribbon bar, change the mode from Context to Designer
4. Open the Table column (Update) function from the Atlas Ribbon Bar
5. Tick to select the Customers table
6. Open the Filters tab
7. Ensure that the Customer account row has =AccountNum as a criteria value.
8. Open the Table columns tab
9. Click to select the Customer Account row
10. Right-click and select =AccountNum
11. Click the Fields button
12. Un-tick all but the Customer account field
13. Click to expand the Available fields node
14. Navigate the list until you find Credit limit. Tick to select this field
15. Navigate the list until you find Credit rating. Tick to select this field
16. Click OK
17. Click to select the Credit limit row
18. Right-click and select =Creditmax
19. Click to select the Credit rating row
20. Right-click and select =CreditRating
21. Click Insert
Table upload functions
63
22. Switch to Context mode
23. Open the Confirmation tab
24. Click Upload
25. Close the workbook after the update is successful but do NOT save
26. Re-open the workbook
27. From the Atlas ribbon bar, click to select the refresh button
Here is an example of a completed workbook:
Figure 37 All accounts have adjusted credit ratings
Table upload functions
64
5.5 Replace function
5.5.1 Outline
This is used to remove existing records from a data source and then append a new set of records as
a replacement. Typically this will only be used on tables that allow for a set of records to be deleted
and then a new set to be added. Because of this, this function may not be appropriate where
records cannot be deleted because of dependencies on other records; as is the case with
customers, vendors and ledger accounts. Normally use this feature on tables like budgets and
forecasts which allow records to be deleted.
Using the Replace function, means you specify a delete action; in which you tell the upload system
what to remove and then build an Append function. You must include all the mandatory fields for
the table so that the Append function does not fail.
5.5.2 Uses for the Replace function
The Replace function is used in the following instances:
Where you want a user to remove a set of records and replace them with a new set. For
example a budget or forecast
Whenever wholesale data changes are required and dependent records do not exist
Where the task of entering records directly in Microsoft Dynamics AX exceeds the time taken by
the Atlas upload system to do the same thing
Table upload functions
65
5.5.3 Walk-through: Find and Replace
5.5.3.1 Scenario
In the Lab exercises for appending records we saw that you add records to the demand forecast
table to represent projected sales for a given customer for the year. To adjust the demand forecast
subsequently, you have to remove the records in Microsoft Dynamics AX manually and then use the
append function again. You have found that a better approach is to use the Find and Replace
method; this removes what was previously loaded and appends new records. You have been asked
to build a Find and Replace template which removes what was previously loaded and adds in any
new records. The workbook contains a list report that shows what is already loaded into the
demand forecast model 100 for the selected customer and year start. To do this, you will:
Build a find and replace template the includes a delete action to remove the existing records
Map named ranges to the template and set any defaults
Select customer 2202 and perform the upload
Here is an example of the workbook: (AX2012 WALKTHROUGH 5.5.3 - Replace Customer Demand
Forecast.xlsx)
Figure 38 Workbook showing sales figures for a selected customer
5.5.3.2 Build the Find and Replace template
Create a Find and Replace template as follows:
7. From the Atlas ribbon bar, change the mode from Standard to Designer
8. From the Atlas ribbon bar, select the Table button and choose Find and Replace from the
menu
9. Tick to select the Demand Forecast table
10. Open the Filters tab
11. Right-click on the Customer account row and select the range =CustomerAcoountId
12. Right-click on the Date row and select the range =StartDate
13. Select the Model row and enter 100 as a criteria value
Table upload functions
66
14. Open the Find and Replace tab
15. Click to select the Find and Replace: Demand forecast node
16. Click the Fields button
17. Un-tick all but the Model, Item number, Date, Quantity and Customer account fields
18. Click to expand the Available fields node
19. Navigate the available fields list. Tick to select the Comments field
20. Navigate the available fields list. Tick to select the Dimension No. field
21. Click the Green plus next to the Dimension No. field to include Inventory dimensions
22. Click to expand the Available fields beneath the Inventory dimension node
23. Tick to include Site, Warehouse, Configuration, Dimension No., Size and Color fields
24. Click OK
The template appears as follows:
Figure 39 Basic demand forecast template without mapping or defaults
Table upload functions
67
5.5.3.3 Mapping and setting defaults for the template
This includes, mapping named ranges in the workbook to templates fields. It also includes setting
any defaults for non-document fields and also applying the correct settings to determine the
inventory dimension codes per record:
1. Click to select the Item number field
2. Right-click and choose =ItemId
3. Click to select the Date field
4. Right-click and choose =StartDate
5. Click to select the Quantity field
6. Right-click and choose =SalesQty
7. Click to select the Customer account field
8. Right-click and choose =CustAccountId
9. Click to select the Comments field
10. Right-click and choose =Comment
11. Click to select the Color field
12. Right-click and choose =InventColorId
13. Click to select the Configuration field
14. Right-click and choose =ConfigId
15. Click to select the Site field
16. Right-click and choose =InventSiteId
17. Click to select the Size field
18. Right-click and choose =InventSizeId
19. Click to select the Warehouse field
20. Right-click and choose =InventLocationId
Table upload functions
68
Figure 40 Mapped template fields
21. Click to select Model
22. Right-click and select Properties…
23. Type 100 in the Value entry box
24. Click the > (Next) button until the Item number field appears
25. In the X++ Table methods entry box, Click the Lookup button to show a list of available
methods
26. Navigate the list until you find InitFromInventTable. Tick to select this field
27. Click OK
28. Click the > (Next) button until the Customer account field appears
29. In the X++ Table methods entry box, Click the Lookup button to show a list of available
methods
30. Navigate the list until you find InitFromCustTable. Tick to select this field
31. Click OK
32. Click the > (Next) button until the Dimension No. field appears
33. Click to select Child field list from the Field type drop-down
34. Click the Lookup button in the Value entry box and tick to select InventDimId field
35. Click OK
36. Click the > (Next) button until the Color field appears
37. Tick to select Is unique
38. Click the > (Next) button until the Configuration field appears
39. Tick to select Is unique
40. Click the > (Next) button until the Site field appears
Table upload functions
69
41. Tick to select Is unique
42. Click the > (Next) button until the Size field appears
43. Tick to select Is unique
44. Click the > (Next) button until the Warehouse field appears
45. Tick to select Is unique
46. Click Apply
47. Close the Properties… window
48. Click Insert
The task pane appears as follows:
Figure 41 Completed template
5.5.3.4 Selecting the customer and performing the upload
Change the customer as follows:
2. Select cell E4
3. Type 2202 and press enter
The report refreshes to show the demand figures for HD televisions for Colorado Airport.
Table upload functions
70
Figure 42 Refreshed report prior to quantity adjustments
Adjust the quantities as follows:
1. Select cell L10 and enter 24
2. Select cell L11 and enter 30
3. Select cell L12 and enter 12
4. Select cell L13 and enter 48
5. Open the Find and Replace tab
6. From the Atlas ribbon bar, change the mode from Designer to Standard
7. From the Atlas ribbon bar, select the Table button and choose Find and Replace from the
menu
8. Tick to select the Demand Forecast document template beneath the Demand forecast table
9. Select the Confirmation tab
10. Click Upload
When complete, the confirmation page reports the number inserted and the number of records
removed. Here is an example of the records in Microsoft Dynamics AX.
Table upload functions
71
Figure 43 Sales forecast for Colorado Airport
Table upload functions
72
5.5.4 Lab Exercises
1. Your sales team would like the ability to set forecasts based on item allocation group and then
choose the customer and the quantity to be sold to them. The workbook has been prepared
already but it is without the upload template to make this work. What you need to do is copy
the template used in the customer based upload and then insert it into this workbook. Having
done this, re-map the named ranges. Use (AX2012 LAB 5.5.4.1 – Replace Customer Item sales
forecast.xlsx)
Challenge yourself!
1. Switch mode to Designer
2. Open Table function Find and Replace
3. Open the AX2012 Training Demand Forecast saved template and insert
4. Check filter tab and named range references to the document
5. Open the Find and replace tab and remove item number, size, color and configuration fields
6. Add item allocation and map to document
7. Update template
8. Switch modes to Standard
9. Perform the upload
Need a little help?
1. Switch from Standard mode to Designer mode
2. From the Atlas ribbon bar, select the Table button and choose Find and Replace from the menu
3. From the Saved query pull-down menu, select Open…
4. Navigate to the settings folder and select AX2012 Training Demand forecast
5. Click Insert
6. Open the Filters tab
7. Ensure the named ranges specified exist in the document
8. Open the Find and Replace tab
9. Click the Fields button
10. Un-tick all the Item number, Size, Color and Configuration fields
11. Click to expand the Available fields node beneath the Demand forecast node
12. Tick to select the Item allocation key field
13. Click OK
14. Click to select Item allocation key field
15. Use the green up-arrow key to move Item allocation key to beneath the Customer account field
16. With Item allocation key selected, right-click and choose Properties…
17. Type =AllocateId in the Value entry box
18. Click Apply and close the Properties… window
19. Click Update
20. Switch from Designer mode to Context mode
21. From the Atlas ribbon bar, select the Table button and choose Find and Replace from the menu and
ensure Demand forecast is ticked
22. Select the Confirmation tab
Table upload functions
73
23. Click Upload
The function deletes the records that meet the Filter criteria and then inserts the replacement
records into the same table as an Append operation.
Figure 44 4 records added and 4 removed
Table upload functions
74
5.6 Key points
This section introduced the three main table upload functions:
Append
Update
Find and Replace (Replace)
In addition to introducing these three functions, it showed how these functions can be used in
conjunction with other features to make the Atlas upload system a powerful addition for Microsoft
Dynamics AX.
Other lessons learned include:
Append is the simplest of functions as it works with new record sets only
Update changes the value in one or more columns of a table
Find and replace is two operations in one; a delete operation and an append action
The Update function uses a filter tab page to define the set of records to which the update will
apply
The find and Replace function uses the Filter tab page to define the delete action
Use these functions when the volume of records to manipulate is large or the time taken to
achieve a given task in Microsoft Dynamics AX is long
Table functions do not normally operate on transaction type tables. Instead, use the journal
functions
Find and Replace is used for Budget and forecasts
Actions on Vendor, Customer, Items, Projects and the like are undertaken using append and/or
the update functions
Table upload functions
75
5.7 Quick interaction
Take a moment to write down the three key points you have learned:
1.
2.
3.
76
6 Journal functions
6.1 Outline
Use the Journal upload functions to post the transactions that you would normally enter using the
journal forms inside Microsoft Dynamics AX. For example, vendor invoice, general journal, fixed
asset journal, inventory movement journal and trade agreements. You can also use this for free-text
invoices, purchase orders and sales orders.
Candidates for this function are those tables in Microsoft Dynamics AX that are defined as type
Worksheet header and Worksheet line.
This function allows you to send a single header record at a time and attach one or more line
records. To achieve multiple header records and multiple lines, you will need to use the Batch task
function described later. (See Chapter 8)
Where a number sequence is involved, such as an order number or journal number, you can
instruct Atlas to return the value it generates to the confirmation task pane and/or to a range in the
worksheet.
Journal upload is an Append action only and is similar to the Table Append function described
earlier.
6.2 Objectives
At the end of this chapter, you will be able to:
Understand how the journal upload function is used
Understand how to use the journal upload templates
Understand how to build an upload template
Understand how to map the template fields to the document
Understand how to edit the journal template once it is in the document
Understand how to use this function with other Atlas functions
Journal functions
77
6.3 Uses of the Journal function
You use the Journal function in the following instances:
During implementation, use this to load new, main table and setup data into Microsoft
Dynamics AX. For example, customers, vendors, dimensions and items
When budget transactions are to be loaded into a new model
When the loading of new records using the Microsoft Dynamics AX client would take longer
than using the Atlas upload system
6.4 Walk-through: Journal upload functions
6.4.1 Scenario
You have prepared a free-text invoice journal workbook that will allow you to upload un-posted
invoices into Microsoft Dynamics AX. Before you can use this workbook you need to build a suitable
Journal upload template. This will need to be included into the document and default settings
applied in addition to the appropriate field mappings. (Use AX2012 WALKTHROUGH 6.4.1 – Journal
Free-text invoice.xlsx).
To do this, you will:
Identify the journal header and journal line tables
Add and remove fields in accordance with the schematic in Section 4.6.1
Map fields and set defaults as required and then insert into the document
Test the upload using customer accounts 1101 and 1102
Here is how the workbook appears:
Figure 45 Free-text invoice workbook with customer lookup shown
Journal functions
78
6.4.2 Identifying journal data sources for the template
All journals have a two table, header and detail structure, as is the case in Microsoft Dynamics AX.
Use the Data sources pane to locate these table and nominate which table is the header and which
is the line table. In this case, these will be the Customer Free-text invoice table and Customer Free-
text invoice lines:
1. From the Atlas ribbon bar, change the mode to Designer
2. From the Atlas ribbon bar, select the Journal button
3. Tick to select the Customer free-text invoices table. This will be the journal header
Figure 46 Customer free text invoice table is selected as the header. See highlight.
4. Tick to select the Journal lines entry at the base of the form.
5. Tick to select Customer Free text invoice lines table as the journal lines
The Data sources pane now has the two tables selected:
Journal functions
79
Figure 47 Header and line tables linked to form a basic template
6.4.3 Add and subtract fields to suit user and system requirements
6.4.3.1 Outline
At this stage it is necessary to understand what are the system required fields and the fields
required by you as a user to achieve a successful upload. For the sake of expediency, in this
example, the system mandatory fields for the header table are: Currency, Customer invoice account,
customer group, Order account, Language id and Invoice date. There are no system mandatory
fields for the lines table, although it is important to know how the header and lines are linked; in this
case, via header record id.
6.4.3.2 Selecting AOT mandatory fields
Open the Journal tab to see the template fields selected by default:
Journal functions
80
You can see that this template contains many of the system mandatory fields but not all. You need
to add Language id and customer group:
1. Click the Fields button
2. When the Add or modify report columns task pane appears, expand the Available fields node
and navigate the list until you find Group (Green plus adjacent). Tick to select this field
3. Navigate the list until you find Language. Tick to select this field
4. Click OK to copy your selections into the list task pane
The field list appears as follows:
Journal functions
81
Figure 48 Mandatory fields added
6.4.3.3 Selecting user required fields and removing redundant fields
Add those fields, over and above the AOT mandatory fields, to be included in the template. These
will be due date, tax group and posting profile (Known to be needed and can be pre-set) in the
header table. In the line table, this will include the addition of Line number (not on sheet) and
parent record id (Reference to the header). The following fields will be removed, Print code, Auto
and Sales tax amount:
1. Click the Fields button
2. When the Add or modify report columns task pane appears, expand the Available fields node
and navigate the list until you find Due. Tick to select this field
3. Navigate the list until you find Posting profile. Tick to select this field
4. Navigate the list until you find Sales tax group. Tick to select this field
5. Click OK
6. Click to select the Customer free text invoice lines node
7. Click the Fields button
8. Un-tick the following fields: Main account, Print code, Sales tax amount and Auto
9. Expand the Available fields node
10. Navigate the list until you find Line number. Tick to select this field
11. Navigate the list until you find MainAccount5. Tick to select this field
12. Navigate the list until you find Reference (Green plus adjacent). Tick to select this field
13. Click OK
5 Use Show system names and select the field name LedgerDimension_MainAccount
Journal functions
82
14. Click to select Reference and use the Green up arrow to position at the top of the list
15. Click to select Line number and use the green up arrow to position beneath Reference
16. Click to select MainAccount and use the green up arrow to position beneath line number
At this stage the template as follows:
Figure 49 Reference is the key field that links the two tables
6.4.4 Map fields, set defaults and insert as an in-document template
What you need to do now, is to assess each field in the template and determine where in the
workbook the data will come from. If it is not from the workbook, it should be set a default:
1. In the Journal tab, select the Customer account field
2. Right-click and select =OrderAccount
3. Select Date
4. Right-click and select =InvoiceDate
5. Select Group
6. Right-click and select =CustGroup
7. Select Due
8. Right-click and select =DueDate
9. Select Sales tax group
10. Right-click and select =TaxGroup
11. Select Description
12. Right-click and select =Description
13. Select Amount
14. Right-click and select =AmountCur
Journal functions
83
15. Select Item sales tax group
16. Right-click and select =TaxItemGroup
17. Click to select Invoice account
18. Click to select Properties…
19. Enter into the Value entry box =OrderAccount
20. Click the > button until the Currency field is selected
21. Enter into the Value entry box =Currency
22. Click the > button until the Language field is selected
23. Enter into the Value entry box en-us
24. Tick to select Hidden
25. Click the > button until the Posting profile field is selected
26. Enter GEN into the Value entry box
27. Tick to select Hidden
28. Click the > button until the Reference field is selected
29. Click to select Parent field list from the Field type drop-down
30. Click the Lookup button in the Value entry box and tick to select RecId field
31. Click OK
32. Tick to select Hidden
33. Click the > button until the Line number field is selected
34. Click to select Incremental from the Field type drop-down
35. Enter 1 into the Value entry box
36. Tick to select Hidden
37. Click the > button until the MainAccount field is selected
38. Enter into the Value entry box =LedgerAccount
39. Click the > button until the Sales tax group field is selected
40. Click to select Parent field list from the Field type drop-down
41. Click the Lookup button in the Value entry box and tick to select TaxGroup field
42. Click OK
43. Tick to select Hidden
44. Click Apply
45. Close the Properties… form
The Journal tab appears as follows:
Journal functions
84
Figure 50 Mapped template, ready for inclusion into the workbook
Include this template as an in-document template as follows:
1. Click the Insert at the base of the task pane
2. From the Atlas ribbon bar, change the mode from Designer to Standard
6.4.5 Test the journal upload
Test the journal upload by using customer accounts 1101 and 1102. To do this you will:
1. Select the cell D6
2. Tick to select the Task pane viewer button on the Atlas ribbon bar
Figure 51 Open the task pane in context mode by using the button on the bottom-right (highlighted)
3. From the list of customers shown, tick to select 1101
4. From the Atlas ribbon bar, select the Journal button
5. Ensure the in-document template Customer Free text invoice is ticked
6. Open the Confirmation tab
7. Click to select the Upload button
When the upload is complete, the number of records added will show 2 and a free-text invoice
added to Microsoft Dynamics AX. Repeat for customer 1102.
In Microsoft Dynamics AX the invoice page, filtered for customers 1101 and 1102 will appear as
follows:
Journal functions
85
Figure 52 Newly added free-text invoices
Journal functions
86
6.5 Lab. Exercises
1. In the previous walk-through, you saw that a free text invoice can be generated using the
Journal upload function. However, a number of fields from the customer table were included in
the workbook and then uploaded. How could this have been done differently?
Challenge yourself!
1. Think about method calls? Do all method calls work?
Need a little help?
1. Here is a snippet of code from the method call InitfromCustTable
2. Why can’t this method be used?
3. How can you adjust the AOT such that this method is available for Atlas to use?
Here is a suggested method call and effect of using this with the Customer free text upload:
Use this on the order account field in the template.
Journal functions
87
2. You have developed a workbook that can be used to upload a sales order. The sales order
workbook is simple, but can be used to demonstrate how easy it is to upload sophisticated
transactions using the Atlas upload system. Using AX2012 LAB 6.5.1.2 – Journal Sales order.xlsx,
you will need to:
a. Create the basic template by identifying the header and line tables
b. Identify and include mandatory fields for both tables
c. Include Inventory dimension table into template
d. Map to document
e. Set defaults
f. Use template to upload a sales order
Format of the workbook is as follows:
Figure 53 Sample sales order
Challenge yourself!
1. Switch from Context to Designer mode
2. Open the Journal function
3. Select sales table as the header and sales line as the lines table
4. Open the Journal tab page
5. Ensure header has these mandatory fields: Currency, Customer group, Language, Customer account,
Invoice account, Sales order and Requested shipping date
6. Ensure the lines table has these mandatory fields: Customer account, Customer group and Requested ship
by date
7. Include user required fields for the header table: Customer requisition, Mode of delivery, Order type and
Requested receipt date
8. Include user required fields for the lines table: Inventory dimension, Line number, Requested receipt date,
Order type, Quantity ordered, Physical sales quantity remaining, Physical inventory quantity remaining,
Price unit, Mode of delivery, Unit and Text
9. Include Inventory dimensions and select all necessary fields
10. For each field in the list use the Properties… window to assign a default or map it to a named range in the
document. Ensure you are familiar with the named ranges in question.
11. Click insert, making the template in-document
12. Switch from Designer to Context mode
13. Select cell E4
14. Select an appropriate customer
Journal functions
88
15. Select cell E8
16. Enter a purchase order number e.g. PO2012100
17. Open the Journal function
18. Open the Confirmation page and Upload and record the sales order number
Need a little help?
1. Switch from Context to Designer mode
2. Open the Journal function
3. Tick to select the Sales order table
4. Tick to select journal lines
5. Tick to select Order lines
6. Open the Journal tab page
7. Click to select the Sales table node
8. Click the Fields button
9. Click to expand the Available fields node
10. Navigate the list until you find Currency, Customer group, Customer requisition, Language, Mode of
delivery, Order type, Requested receipt date and Requested shipping. Tick to select these fields
11. Click OK
12. Click to select the Order lines node
13. Click the Fields button
14. Click to expand the Available fields node
15. Navigate the list until you find Customer account, Deliver remainder (RemainInventPhysical), Deliver
remainder (RemainSalesPhysical), Dimension No., Group, Line number, Mode of delivery, Price unit,
Quantity (QtyOrdered), Requested ship date, Requested receipt date, Text, Type, and Unit. Tick to select
these fields.
16. Click OK
Figure 54 Order lines with system and user required fields
17. Click to select the Order lines node
Journal functions
89
18. Click the Fields button
19. Click to select the green plus adjacent to the Dimension No. field
20. Click to expand the Available fields node beneath the Inventory dimensions node
21. Navigate the list until you find Batch, Color, Configuration, Dimension No., Site, Size, Warehouse. Tick to
select these fields
22. Click OK
23. Using the following table as a guide, right-click to map the fields to the named ranges of the Sales table:
Column Named range
Name =SalesName
Customer account =CustAccount
Currency =CurrencyCode
Customer requisition =PurchOrderFormNum
Requested receipt date =ReceiptDateRequested
Requested ship date =ShippingDateReequested
Mode of delivery =DlvMode
24. Click to select Sales order, then use right-click and select Properties…
24. Tick to select Number sequence
25. Tick to select Hidden
26. In the Value entry box, type AR_018
27. Click the > button until the Invoice account field is selected
28. Enter into the Value entry box =CustAccount
29. Click the > button until the Status field is selected
30. Enter into the Value entry box Backorder
31. Tick to select Hidden
Journal functions
90
32. Click the > button until the Customer group field is selected
33. Enter into the Value entry box 10
34. Tick to select Hidden
35. Click the > button until the Language field is selected
36. Enter into the Value entry box en-us
37. Tick to select Hidden
38. Click the > button until the Order type field is selected
39. Enter into the Value entry box Sales
40. Tick to select Hidden
41. Click Apply and close the Properties… form
42. Using the following table as a guide, right-click to map the fields to the named ranges of the Order lines
table:
Column Named range
Item number =ItemId
Quantity =SalesQty
Unit price =SalesPrice
Net amount =LineAmount
Currency =CurrencyCode
Mode of delivery =DlvMode
Requested receipt date =ReceiptDateRequested
Requested ship date =ShippingDateReequested
Text =Name
Unit =SalesUnit
Batch =InventBatchId
Color =InventColorId
Configuration =ConfigId
Site =InventSiteId
Size =InventSizeId
Warehouse =InventLocationId
Journal functions
91
43. Click to select Sales order, then use right-click and select Properties…
44. Click to select Parent field list from the Field type drop-down
45. Click the Lookup button in the Value entry box and tick to select SalesId field
46. Click OK
47. Tick to select Hidden
48. Click the > button until the Line status field is selected
49. Enter into the Value entry box Backorder
50. Tick to select Hidden
51. Click the > button until the Customer field is selected
52. Click to select Parent field list from the Field type drop-down
53. Click the Lookup button in the Value entry box and tick to select CustAccount field
54. Click OK
55. Click the > button until the Deliver remainder field is selected
56. Enter into the Value entry box =SalesQty
57. Click the > button until the next Deliver remainder field is selected
58. Enter into the Value entry box =SalesQty
59. Click the > button until the Dimension No. field appears
60. Click to select Child field list from the Field type drop-down
61. Click the Lookup button in the Value entry box and tick to select InventDimId field
62. Click OK
63. Tick to select Hidden
64. Click the > button until the Group field is selected
65. Click to select Parent field list from the Field type drop-down
66. Click the Lookup button in the Value entry box and tick to select CustGroup field
67. Click OK
68. Tick to select Hidden
69. Click the > button until the Line number field is selected
70. Click to select Incremental from the Field type drop-down
71. In the Value entry box, type 1
72. Tick to select Hidden
73. Click the > button until the Price unit field is selected
74. In the Value entry box, type 1
75. Tick to select Hidden
76. Click the > button until the Quantity (QtyOrdered) field is selected
77. Enter into the Value entry box =SalesQty
78. Click the > button until the Type field is selected
79. Enter into the Value entry box Sales
80. Tick to select Hidden
81. Click the > button until each inventory dimension field (Batch, Color, Configuration, Site, Size &
Warehouse) is selected. In turn tick to select Unique.
82. Click Apply and close the Properties… window
Journal functions
92
83. Click Insert
Figure 55 Mapped template with defaults
84. Click to select the Sales order node at the top of the task pane and click Properties…
85. In the Returns drop-down, select Sales Id and click OK
86. Click Update
87. Switch from Designer to Standard mode
88. Select cell E4
89. Tick to select customer 1101 from the list of customers in the task pane
90. Select cell E8
91. Enter a purchase order number E.g. P2012101
92. From the Atlas ribbon, select the Journal function
93. Ensure that the in-document template Sales Order is ticked
94. Open the Confirmation tab
95. Click Upload
96. Take note of the sales order number e.g. SO-101249
The function appends the sales order into the account receivable module, from which you can then
post a confirmation. Here is an example of the workbook and the sales order in Microsoft Dynamics
AX:
Journal functions
93
Figure 56 Being the successful upload
Figure 57 Newly created sales order in AX
Journal functions
94
6.6 Key points
This section introduced the Journal upload function. You also learned that:
Append is the only action allowed using this function
A journal is made up of a header table and a lines table
Normally these tables are classified as Worksheet header and Worksheet line in the AOT
A journal will add one header record and one or more detail or line records
Saved templates are used to define the tables involved and the linkages between them
Saved templates are selected, mapped and included into the document
Templates can use defaults and these can be drawn from:
o Number sequences
o Fields in the related header table
o Pre-set values in the template
o Or from the document
Use this function to add transactions to your Microsoft Dynamics AX system when:
o You need to load opening transactions and balances at time of system start-up
o You want to load transactions into Microsoft Dynamics AX that need manipulation by or
are sourced from Excel
o You need to interface external systems where an automatic interface is not possible
o You want to provide casual users with a means to prepare transactions using a familiar
interface. E.g. timesheets, employee travel expenses, customer forecasts etc.
Journal functions
95
6.7 Quick interaction
Take a moment to write down the three key points you have learned:
1.
2.
3.
96
7 Matrix style upload
7.1 Outline
Matrix style uploads allow you to send tabular data to Microsoft Dynamics AX. The matrix must be
date based, where each column represents a date range. E.g. Month or day. Examples of a matrix
style upload include financial budgets, forecasts and timesheets. You can use this style of upload on
all the Atlas upload functions.
When building these templates, you must nominate the amounts to be tabulated and the date
basis. To map the tabulated amounts, you must be in Standard mode and not Designer. This mode
allows you to identify each column or range of values from the workbook. Use the Save function on
the Confirmation tab to ensure the template is updated properly in the workbook.
Columns can be contiguous or non-contiguous, in other words, the data for each upload might be
separated by several columns and each column can have a different date basis. For example, you
might upload a monthly forecast for the next three months and quarterly figures in three columns
thereafter.
Matrix style uploads create records for each intersection of row and column.
7.2 Objectives
At the end of this chapter, you will be able to:
Understand when to use a matrix style upload
Understand what functions can use a matrix style upload
Understand how to build a matrix style upload
Understand how to map tabulated amounts in Standard mode
Understand what is meant by contiguous and non-contiguous columns
Understand how to use the auto-generated date feature
Matrix style upload
97
7.3 Uses for Matrix uploads
The Matrix style of upload is used in the following instances:
Typical examples include: Supply, Demand and Inventory forecasts, financial budgets,
timesheets
Where you want to load a set of records that is organized in a tabular, date based format in
your workbook
7.4 Matrix uploads
7.4.1 Walk-through: Sales forecast upload
7.4.1.1 Scenario
The demand forecast demonstrated earlier, showed how you can replace the data inside Microsoft
Dynamics AX, but was limited to a single demand figure for the year. In many of the workbooks in
your organization, you have found that the demand figures are broken down by month. Use one of
these workbooks to build a matrix upload so that each demand figure is loaded by month. To do
this, you will:
Build a basic find and replace template the includes a delete action to remove the existing
records
Adjust the template to accommodate a 12 month spread based on Start date
Map non-tabulated fields and set field level template defaults
Map tabulated fields to named ranges and save the template
Select customer 2202 and perform the upload
Here is an example of the workbook: (AX2012 WALKTHROUGH 7.4.1 – Matrix Replace Customer
Demand Forecast.xlsx)
7.4.1.2 Build the Find and Replace template
Create a Find and Replace template as follows:
1. From the Atlas ribbon bar, change the mode from Standard to Designer
2. From the Atlas ribbon bar, select the Table button and choose Find and Replace from the
menu
3. Tick to select the Demand Forecast table
4. Open the Filters tab
5. Right-click on the Customer account row and select the range =CustomerAcoountId
6. Click on the Date row and enter the range =DeleteDate
Matrix style upload
98
7. Select the Model row and enter 100 as a criteria value
8. Open the Find and Replace tab
9. Click to select the Find and Replace: Demand forecast node
10. Click the Fields button
11. Un-tick all but the Model, Item number, Date, Quantity and Customer account fields
12. Click to expand the Available fields node
13. Navigate the available fields list. Tick to select the Comments field
14. Navigate the available fields list. Tick to select the Dimension No. field
15. Click the Green plus next to the Dimension No. field to include Inventory dimensions
16. Click to expand the Available fields beneath the Inventory dimension node
17. Tick to include Site, Warehouse, Configuration, Dimension No., Size and Color fields
18. Click OK
The template appears as follows:
Matrix style upload
99
Figure 58 Basic demand forecast template without mapping or defaults
7.4.1.3 Adjust the template to accommodate the matrix style
This involves changing the Default basis for the quantity column to include a figure for the number
of columns the value for that field can be found. For example 12, one for each month:
1. Click to select Quantity
2. Right-click and select Properties…
3. Click to select Number of columns from the Field type drop-down
4. Type 12 in the Number of columns entry box
5. Click to select Date from the Date field drop-down
6. Click Apply
7. Close the Properties… window
The task pane appears as follows:
Matrix style upload
100
Figure 59 Matrix style with columns to match months
7.4.1.4 Mapping and setting defaults for the template for non-tabulated fields
This includes, mapping named ranges in the workbook to templates fields. It also includes setting
any defaults for non-document fields and also applying the correct settings to determine the
inventory dimension codes per record:
1. Click to select the Item number field
2. Right-click and choose =ItemId
3. Click to select the Customer account field
4. Right-click and choose =CustAccountId
5. Click to select the Comments field
6. Right-click and choose =Comment
7. Click to select the Color field
8. Right-click and choose =InventColorId
9. Click to select the Configuration field
10. Right-click and choose =ConfigId
11. Click to select the Site field
12. Right-click and choose =InventSiteId
13. Click to select the Size field
14. Right-click and choose =InventSizeId
15. Click to select the Warehouse field
16. Right-click and choose =InventLocationId
Matrix style upload
101
Figure 60 Mapped non-tabulated template fields
17. Click to select Model
18. Right-click and select Properties…
19. Type 100 in the Value entry box
20. Click the > (Next) button until the Item number field appears
21. In the X++ Table methods entry box, Click the Lookup button to show a list of available
methods
22. Navigate the list until you find InitFromInventTable. Tick to select this field
23. Click OK
24. Click the > (Next) button until the Customer account field appears
25. In the X++ Table methods entry box, Click the Lookup button to show a list of available
methods
26. Navigate the list until you find InitFromCustTable. Tick to select this field
27. Click OK
28. Click the > (Next) button until the Dimension No. field appears
29. Click to select Child field list from the Field type drop-down
30. Click the Lookup button in the Value entry box and tick to select InventDimId field
31. Click OK
32. Click the > (Next) button until the Color field appears
33. Tick to select Is unique
34. Click the > (Next) button until the Configuration field appears
35. Tick to select Is unique
36. Click the > (Next) button until the Site field appears
Matrix style upload
102
37. Tick to select Is unique
38. Click the > (Next) button until the Size field appears
39. Tick to select Is unique
40. Click the > (Next) button until the Warehouse field appears
41. Tick to select Is unique
42. Click Apply
43. Close the Properties… window
44. Click Insert
Again here is an example of the task pane:
Figure 61 Defaults set
7.4.1.5 Mapping tabulated fields
Values for the quantity and date fields come from multiple columns in the document, what you
need to do is map the extended columns, broken out into 12 separate grid entries, to the ranges in
the document where the data is sourced. You MUST do this using Standard mode:
1. From the Atlas ribbon bar, change the mode to Standard
2. Open the Find and Replace tab
3. Click to select the Date[1] row and enter =Jul in the criteria column
4. Click to select the Date[2] row and enter =Aug in the criteria column
5. Click to select the Date[3] row and enter =Sep in the criteria column
6. Click to select the Date[4] row and enter =Oct in the criteria column
7. Click to select the Date[5] row and enter =Nov in the criteria column
8. Click to select the Date[6] row and enter =Dec in the criteria column
9. Click to select the Date[7] row and enter =Jan in the criteria column
Matrix style upload
103
10. Click to select the Date[8] row and enter =Feb in the criteria column
11. Click to select the Date[9] row and enter =Mar in the criteria column
12. Click to select the Date[10] row and enter =Apr in the criteria column
13. Click to select the Date[11] row and enter =May in the criteria column
14. Click to select the Date[12] row and enter =Jun in the criteria column
Figure 62 Where date values can be found in the document is identified by named ranges
15. Click to select the Quantity[1] row and enter =JulQty in the criteria column
16. Click to select the Quantity[2] row and enter =AugQty in the criteria column
17. Click to select the Quantity[3] row and enter =SepQty in the criteria column
18. Click to select the Quantity[4] row and enter =OctQty in the criteria column
19. Click to select the Quantity[5] row and enter =NovQty in the criteria column
20. Click to select the Quantity[6] row and enter =DecQty in the criteria column
21. Click to select the Quantity[7] row and enter =JanQty in the criteria column
22. Click to select the Quantity[8] row and enter =FebQty in the criteria column
23. Click to select the Quantity[9] row and enter =MarQty in the criteria column
24. Click to select the Quantity[10] row and enter =AprQty in the criteria column
25. Click to select the Quantity[11] row and enter =MayQty in the criteria column
26. Click to select the Quantity[12] row and enter =JunQty in the criteria column
Matrix style upload
104
Figure 63 Demand quantities are found by using named ranges for each column
27. Open the Confirmation tab
28. Click to select Save6
A confirmation of the saved template is shown in the status page:
7.4.1.6 Adjusting the workbook and performing the upload
Change the customer as follows:
1. Select cell E4
2. Type 2202 and press enter
The report refreshes to show the demand figures for HD televisions for Colorado Airport.
6 This saves the template into the document in the same fashion as the Insert button during Design mode
Matrix style upload
105
Figure 64 Refreshed report prior to quantity adjustments
Adjust the quantities as follows:
1. Select cell M10 and enter 2. Copy to cell X10
2. Select cell M11 and enter 1. Copy to cell X11
3. Select cell M12 and enter 3. Copy to cell X12
4. Select cell M13 and enter 4. Copy to cell X13
5. From the Atlas ribbon bar, change the mode from Designer to Standard
6. From the Atlas ribbon bar, select the Table button and choose Find and Replace from the
menu
7. Tick to select the Demand Forecast document template beneath the Demand forecast table
8. Select the Confirmation tab
9. Click Upload
When complete, the confirmation page reports the number of records inserted and removed. Here
is an example of the records in Microsoft Dynamics AX.
Figure 65 Sales forecast for Colorado Airport
Matrix style upload
106
7.4.2 Auto generating date values
In the previous Walk-Through we saw that the date was manually configured for each column; in
fact, the Date field was included as a part of the matrix section in the template. At runtime, the date
value and the quantity values were identified and mapped. You can get Atlas to auto-generate the
date values for you as long as each column is on the same periodicity. E.g. all represent a discrete
month. If your upload includes columns of differing periodicity, then you must determine the date
by reference to the sheet (as above) or by including the date in the template.
To do the same upload as above, but generating the date automatically, set the template on the
Quantity field as follows:
Figure 66 Atlas uses these values to auto-generate the date, with each column representing 1 month
Note: changing the numerator will affect the resulting date calculation. If set to 1, as above, then each column’s
calculated date will be advanced by 1 month. If the numerator is 2, the then each column’s calculated date will be
offset by 2 months. So starting at 01/01/2012, the next column will have a date value of 01/03/2012.
Matrix style upload
107
7.4.3 Lab Exercises
1. Using the sample template from LAB 5.5.4.1 (Replace Customer Item sales forecast), adjust the
template to suit the tabulated customer demand figures. Use AX2012 LAB 7.4.3.1 – Matrix
Replace Customer Item allocation forecast.xlsx
Challenge yourself!
1. Switch mode to Designer
2. Open Table function Find and Replace
3. Open the AX2012 Training Demand Forecast saved template and insert
4. Check filter tab and named range references to the document
5. Open the Find and replace tab and remove item number, size, color and configuration fields
6. Add item allocation and map to document
7. Update template
8. Switch modes to Standard
9. Perform the upload
Need a little help?
1. Switch from Standard mode to Designer mode
2. From the Atlas ribbon bar, select the Table button and choose Find and Replace from the menu
3. From the Saved query pull-down menu, select Open…
4. Navigate to the settings folder and select AX2012 Training Matrix Demand forecast
5. Click Insert
6. Open the Filters tab
7. Change the filter criteria for date from =StartDate to =DateRange
8. Ensure the named ranges specified exist in the document
9. Open the Find and Replace tab
10. Click the Fields button
11. Un-tick all the Item number, Size, Color and Configuration fields
12. Click to expand the Available fields node beneath the Demand forecast node
13. Tick to select the Item allocation key field
14. Click OK
15. Click to select Item allocation key field
16. Use the green up-arrow key to move Item allocation key to beneath the Customer account field
17. With Item allocation key selected, right-click and choose Properties…
18. Type =AllocateId in the Value entry box
19. Click the > button until the Quantity field appears
20. Remove the =SalesQty range from the Value entry box
21. In the Field type drop-down box, select Number of columns
22. In the number of columns box, type 12
23. Select Date in the field basis drop-down box
24. Click Apply and close the Properties… window
25. Click Update
Matrix style upload
108
26. Switch from Designer mode to Context mode
27. From the Atlas ribbon bar, select the Table button and choose Find and Replace from the menu and
ensure Demand forecast is ticked
28. Open the Find and Replace tab
29. Click to select the Date[1] row and enter =Jul in the criteria column
30. Click to select the Date[2] row and enter =Aug in the criteria column
31. Click to select the Date[3] row and enter =Sep in the criteria column
32. Click to select the Date[4] row and enter =Oct in the criteria column
33. Click to select the Date[5] row and enter =Nov in the criteria column
34. Click to select the Date[6] row and enter =Dec in the criteria column
35. Click to select the Date[7] row and enter =Jan in the criteria column
36. Click to select the Date[8] row and enter =Feb in the criteria column
37. Click to select the Date[9] row and enter =Mar in the criteria column
38. Click to select the Date[10] row and enter =Apr in the criteria column
39. Click to select the Date[11] row and enter =May in the criteria column
40. Click to select the Date[12] row and enter =Jun in the criteria column
41. Click to select the Quantity[1] row and enter =JulQty in the criteria column
42. Click to select the Quantity[2] row and enter =AugQty in the criteria column
43. Click to select the Quantity[3] row and enter =SepQty in the criteria column
44. Click to select the Quantity[4] row and enter =OctQty in the criteria column
45. Click to select the Quantity[5] row and enter =NovQty in the criteria column
46. Click to select the Quantity[6] row and enter =DecQty in the criteria column
47. Click to select the Quantity[7] row and enter =JanQty in the criteria column
48. Click to select the Quantity[8] row and enter =FebQty in the criteria column
49. Click to select the Quantity[9] row and enter =MarQty in the criteria column
50. Click to select the Quantity[10] row and enter =AprQty in the criteria column
51. Click to select the Quantity[11] row and enter =MayQty in the criteria column
52. Click to select the Quantity[12] row and enter =JunQty in the criteria column
53. Select the Confirmation tab
54. Click Save
55. Click Upload
When the upload is complete, a confirmation of the records added and removed is presented:
Matrix style upload
109
Matrix style upload
110
2. Using the same workbook design as in LAB 7.4.3.1 and the sample template from LAB 5.5.4.1
(Replace Customer Item sales forecast), adjust the template to suit the tabulated customer
demand figures but this time use the contiguous columns method. Use AX2012 LAB 7.4.3.2 –
Matrix Replace Customer Item allocation contiguous forecast.xlsx
Challenge yourself!
1. Switch mode to Designer
2. Open Table function Find and Replace
3. Open the AX2012 Training Demand Forecast saved template and insert
4. Check filter tab and named range references to the document
5. Open the Find and replace tab and remove item number, size, color and configuration fields
6. Set quantity to have a periodicity of 1 month per column
7. Add item allocation and map to document
8. Update template
9. Switch modes to Standard
10. Perform the upload
Need a little help?
1. Switch from Standard mode to Designer mode
2. From the Atlas ribbon bar, select the Table button and choose Find and Replace from the menu
3. From the Saved query pull-down menu, select Open…
4. Navigate to the settings folder and select AX2012 Training Matrix Demand forecast
5. Click Insert
6. Open the Filters tab
7. Change the filter criteria for date from =StartDate to =DateRange
8. Ensure the named ranges specified exist in the document
9. Open the Find and Replace tab
10. Click the Fields button
11. Un-tick all the Item number, Size, Color and Configuration fields
12. Click to expand the Available fields node beneath the Demand forecast node
13. Tick to select the Item allocation key field
14. Click OK
15. Click to select Item allocation key field
16. Use the green up-arrow key to move Item allocation key to beneath the Customer account field
17. With Item allocation key selected, right-click and choose Properties…
18. Type =AllocateId in the Value entry box
19. Click the > button until the Quantity field appears
20. Remove the =SalesQty range from the Value entry box
21. In the Field type drop-down box, select Number of columns
22. In the number of columns box, type 12
23. Select Date in the field basis drop-down box
24. In the Represents entry box, type 1 and the choose the Month basis from the adjacent drop-down
25. Click Apply and close the Properties… window
Matrix style upload
111
26. Click Update
27. Switch from Designer mode to Context mode
28. From the Atlas ribbon bar, select the Table button and choose Find and Replace from the menu and
ensure Demand forecast is ticked
29. Open the Find and Replace tab
30. Click to select the Quantity[1] row and enter =JulQty in the criteria column
31. Click to select the Quantity[2] row and enter =AugQty in the criteria column
32. Click to select the Quantity[3] row and enter =SepQty in the criteria column
33. Click to select the Quantity[4] row and enter =OctQty in the criteria column
34. Click to select the Quantity[5] row and enter =NovQty in the criteria column
35. Click to select the Quantity[6] row and enter =DecQty in the criteria column
36. Click to select the Quantity[7] row and enter =JanQty in the criteria column
37. Click to select the Quantity[8] row and enter =FebQty in the criteria column
38. Click to select the Quantity[9] row and enter =MarQty in the criteria column
39. Click to select the Quantity[10] row and enter =AprQty in the criteria column
40. Click to select the Quantity[11] row and enter =MayQty in the criteria column
41. Click to select the Quantity[12] row and enter =JunQty in the criteria column
42. Select the Confirmation tab
43. Click Save
44. Click Upload
Here is an example of the completed workbook:
Matrix style upload
112
7.5 Key points
This chapter introduced the Matrix upload feature, where you can upload records that are based on
tabulated workbooks in which each column represents a period of time. You also learned that:
The feature is available for all upload functions including journal upload
Commonly used with budget and forecast upload but not limited to these types. Can be used,
for example, with timesheets
Tabulated data in a workbook; can be in contiguous or non-contiguous columns.
In setting up a template for the matrix style uploads, you need to:
o Change the column type to Number of columns
o Setting the number of columns involved (fixed)
o Stipulating whether the date is to be calculated automatically
Mapping the tabulated columns must be done in Standard and not Designer mode. Save the
adjusted template from the Confirmation screen
There can be multiple numeric values being uploaded this way. For example, amount and
quantity
The date value for each column can be determined from the document, hard coded into the
template for each column or generated automatically
Auto-generated dates assume that each column has the same period basis and has a set offset
from the starting column
A record is created in Microsoft Dynamics AX for each row and column intersection.
Use Skip zero to avoid uploading intersections with a zero value
Matrix style upload
113
7.6 Quick interaction
Take a moment to write down the three key points you have learned:
1.
2.
3.
Batch tasks
114
8 Batch tasks
8.1 Outline
Batch tasks are an important feature when dealing with data structures that include many tables to
support a single Microsoft Dynamics AX master data entity, for example, Customers or Vendors. It
allows you to run one or more upload templates in a user defined sequence. This sequence can
include a mix of table and journal upload templates and can include special events that can be
triggered mid-sequence, for example, workbook refresh events or messaging events for user
information.
Batch tasks are the mechanism you should use if you wish to perform upload splits; these allow you
generate multiple uploads based on a changing value in the document, for example company,
without having to duplicate the upload template itself.
Batch tasks are held in-document in the same fashion as templates.
8.2 Objectives
At the end of this chapter, you will be able to:
Understand how you can use Batch tasks
Understand the how to create and insert a batch into your document
Understand how to order templates in a batch
Understand how the special event triggers of a batch
Understand how to set up and use the Split feature
Batch tasks
115
8.3 Uses for the Batch task list
Use the Batch tasks feature in the following circumstances:
When you need to upload into multiple tables to complete a functional task and where order of
upload is important
When you need to use a single upload template for one or more companies
When you want to upload multiple journals based on a changing attribute within the source
document
Where you need to load into many single tables such as is the case when loading into Vendors,
Customer, Items and the like.
Batch tasks
116
8.4 Walk-through: Creating and running batch task list
8.4.1 Outline
You noticed that when you upload customers, you are faced with uploading multiple tables and
that you must load them in a prescribed sequence, else the upload will not work correctly. You have
decided to explore the use of the Batch feature, which allows you to add multiple templates into a
run sequence. Using the customer and address book templates from chapter 5:
Add the Address book and then the customer uploads to a simple batch task
Include a message to denote the start of the upload
Include an Excel function that counts the number of records added. This will be in the named
range called Counter.
Note: The party id is sourced from the workbook and the customer account number is generated using a number
sequence.
Use AX2012 WALKTHROUGH 8.4.1 – Batch Append Customers.xlsx.
Figure 67 Simple customer upload, no postal address details
8.4.2 Creating the batch and adding templates
The first step is to create the batch and add the templates:
1. From the Atlas ribbon bar, change the mode from Standard to Designer
2. From the Atlas ribbon bar, select the Batch tasks button
3. Open the Job selection tab
4. Click to select the New task node at the top of the task pane
5. Right-click and choose Rename
6. Type a Simple customer append7 in the entry box
7. Click the Templates button
8. Click to expand the Connection node
9. Click to expand the Address book tab and tick to select Address book
10. Click Apply
11. Click to expand the Connection node
7 This is the name for the collection of upload templates to be added to this Batch.
Batch tasks
117
12. Click to expand the Customers tab and tick to select Customers
13. Click OK
14. Click Insert
The batch task with added templates appears as follows:
Figure 68 Simple batch job that allows customers to be loaded
8.4.3 Adding command functions
Command functions instruct Atlas to take action outside of the upload framework and can be one
of the following types:
Display
Insert
Refresh
The Display function, allows you to send a message to the user via dialog box, Insert can put a value
into a cell in your workbook, where that value can be an Excel formula function and Refresh causes
the workbook to be recalculated as if you pressed Alt+F9.
In this example you want to display a message when job starts and then insert a record count into
the cell named Counter:
1. Click the Actions button
2. Click to select Display
3. When the Actions dialog appears, type Starting batch, press OK
4. Click Apply
5. Close the Actions dialog
6. Click to select the Display message, click the Green up arrow until the action is at the top of the
batch list
7. Click the Actions button
8. Click to select Insert
Batch tasks
118
9. When the Actions dialog appears, type Counter in the Control entry box
10. Type =COUNTA(PARTYNUMBER)8 into the Value entry box
11. Click Apply
12. Click Insert
The batch task list appears as follows:
8.4.4 Running the batch tasks
Running the batch is the same as running a normal template upload, except there are multiple
templates and actions running in sequence:
1. From the Atlas ribbon bar, change the mode from Designer to Standard
2. From the Atlas ribbon bar, select the Batch tasks button
3. Tick to select the Simple customer append
4. Open the Start batch tab
8 This counts the number of alpha-numeric entries in the named range called PartyNumber
Batch tasks
119
Figure 69 Batch tasks in run sequence
5. Click the Run button to start the batch
6. Click OK when the Display message appears:
As each step is completed, the status indicator on the right-hand side of the pane, changes from
yellow to green if successfully completed. Here is the completed job:
Figure 70 Note the count in cell D12
Batch tasks
120
8.4.5 Errors during execution and sequence control commands
8.4.5.1 Outline
If the upload were to be done again, and depending on the templates involved, an error reporting
duplicate records will be thrown. As with all template validation, the nature of the error will dictate
how you fix that and continue. That is: fix the data inside Microsoft Dynamics AX or correct the data
in the source document. Here is an example of an error message returned from the batch tasks
process:
Options available to you include:
Resume
Restart
Skip
Reset
8.4.5.2 Resume command
This allows a failed task to be executed again. Use this when you want to re-try a failed step in the
execution sequence and when you have rectified data inside Microsoft Dynamics AX.
8.4.5.3 Restart
Start the sequence from the first step. Use this if you want to re-do the upload using the batch.
8.4.5.4 Skip command
Use this command when you want to skip over a step in the execution sequence knowing that the
subsequent steps in the sequence are not dependent on the step to be skipped. Use this when you
want to fix the source document and upload the data at a later stage.
8.4.5.5 Reset command
This changes the state of each template in the batch task to Ready, the state used before execution
of the batch.
Batch tasks
121
8.5 Walk-through: Using the split function
8.5.1 Outline
The split function can be used when you want to run a template repeatedly based on an attribute in
the workbook; such as a company account reference or a reference number. In this example, the list
of customers is divided into two groups; one for the company CEU and the other for CEC, each is to
be loaded into their respective companies using the batch task built to service a single entity. To do
this you will:
Adjust the templates to support the selection of company accounts
Adjust the batch tasks to switch on splits
Run the upload
Use AX2012 WALKTHROUGH 8.5.1 – Batch Append Multicompany Customers.xlsx
Figure 71 Multi-company customer upload
8.5.2 Adjusting the template to select company
In the case where your template does not include the split basis as a field, then you will need to add
that field and map it to the document. In this case the Company accounts field:
1. From the Atlas ribbon bar, change the mode from Standard to Designer
2. From the Atlas ribbon bar, select the Table button and choose Append from the menu
3. Tick to select the Address book document template
4. Open the Append tab
5. Click to select the Company accounts field
6. Right-click and choose =DataAreaId
7. Click Insert
8. Open the Data sources tab
9. Tick to select the Customers document template
10. Open the Append tab
11. Click to select the Company accounts field
Batch tasks
122
12. Right-click and choose =DataAreaId
13. Click Insert
8.5.3 Setting the split basis
This stage involves setting the batch job up to prepare for split uploads:
1. From the Atlas ribbon bar, select the Batch tasks button
2. Tick to select the Simple customer append
3. Open the Job selection tab
4. Click to select the Address book template
5. Click the Properties… button
6. Tick to select DataAreaId in the split parameters window
7. Click Apply and click Close
8. Click to select the Customer template
9. Click the Properties… button
10. Tick to select DataAreaId in the split parameters window
11. Click Apply and click Close
12. Click Insert
The batch task form appears as follows:
Figure 72 Split templates are highlighted with bold lettering
8.5.4 Running a batch task list with active splits
Once the templates in the batch have been activated for split processing, you can now execute the
batch. In this example, for each company account identified in column I, a new instance of the
upload template will be generated:
1. From the Atlas ribbon bar, change the mode from Designer to Standard
2. From the Atlas ribbon bar, select the Batch tasks button
3. Tick to select the Simple customer append
4. Open the Start batch tab
5. Click the Run button to start the batch
6. Click OK when the Display message appears
Batch tasks
123
As each step is completed, the status indicator on the right-hand side of the pane, changes from
yellow to green if successfully completed. Here is the completed job:
Figure 73 Note the expanded batch task list
In Microsoft Dynamics AX you can see the two sets of customers in the respective companies:
Batch tasks
124
8.6 Lab Exercises
1. For some new customers, the creation of their account is managed by sales representatives of
the company. For these customers, a one-off setup fee is applied which gives them immediate
credit and the ability place orders. The sales representatives have complained that to this they
have to use three separate upload templates and sometimes they get the sequence wrong,
which leans to errors and corresponding frustrations. You have decided to adjust their
templates and incorporate the upload templates into a batch task. Use (AX2012 LAB 8.6.1.1 –
Batch Free-text invoice.xlsx)
Challenge yourself!
1. Switch mode to Designer
2. Open Batch tasks
3. Create a new batch task that will host the upload templates
4. Open the AX2012 Training Demand Forecast saved template and insert
5. Check filter tab and named range references to the document
6. Open the Find and replace tab and remove item number, size, color and configuration fields
7. Add item allocation and map to document
8. Update template
9. Switch modes to Standard
10. Perform the upload
Need a little help?
1. Switch from Standard mode to Designer mode
2. From the Atlas ribbon bar, select the Batch tasks button
3. Open the Job selection tab
4. Click to select the New task node at the top of the task pane
5. Right-click and choose Rename
6. Type a load customer and apply fee in the entry box
7. Click the Templates button
8. Click to expand the Connection node
9. Click to expand the Address book node and tick to select Address book
10. Click Apply
11. Click to expand the Connection node
12. Click to expand the Customers node and tick to select Customers
13. Click Apply
14. Click to expand the Connection node
15. Click to expand the CustInvoiceLine node and tick to select Customer free text invoices
16. Click OK
Batch tasks
125
Figure 74 Upload templates selected in the correct sequence
17. Click the Actions button
18. Click to select Refresh
19. Click Apply
20. Click Insert
21. With the Refresh action highlighted, use the up arrow until the Refresh action appears above the
Customer free-text invoice template
22. From the Atlas ribbon bar, change the mode from Designer to Standard
23. From the Atlas ribbon bar, select the Batch tasks button
24. Tick to select the Load customer and apply fee
25. Open the Start batch tab
26. Click the Run button to start the batch
The following represents a successful upload:
Batch tasks
126
Figure 75 All templates in the batch were executed without failure
In Microsoft Dynamics AX the following Free text invoice will be raised:
Batch tasks
127
8.7 Key points
This chapter introduced the Batch tasks feature, where you can create a run sheet of upload
templates organized into a sequence. You also learned that:
You can include any upload template style in the batch. For example you might include a series
of Append templates to upload reference data and then include a journal template to record a
transaction.
Batch tasks can include Actions, of which there are three types:
o Display
o Insert
o Refresh
Refresh will cause any open workbooks to be recalculated. Per the Excel recalculate function
Insert allows you include a value or Excel function into a cell
Display allows you to present an OK message box to the user
Batch tasks dictate the order in which templates are executed. This helps when many templates
need to be uploaded to achieve a given functional task
Templates in a Batch can be split into sub-ordinate templates based on a value in a column of
the workbook. E.g. Company account
Splits can be performed on any column in the source workbook. For example, an upload might
be repeated for each change in a reference number
Should a template fail to load successfully, you have a number of procedure functions that can
help with how that step in the batch list managed. These functions are:
o Skip
o Resume
o Restart
o Reset
Skip allows you to continue on with batch but ignore the failed template
Resume means re-try the failed template. Use this when you can correct the reason for the
failure
Restart will start the batch from the first step
Reset changes the status of all steps back to the Ready state. (Pre-execution)
Batch tasks are inserted into a document in the same fashion as a template and you can export
batch tasks like templates too.
Individual document templates can be executed outside of the batch.
Batch tasks
128
8.8 Quick interaction
Take a moment to write down the three key points you have learned:
1.
2.
3.
Batch tasks
129
COPYRIGHT NOTICE
Copyright © 2009, Globe Software Pty Ltd, All rights reserved.
Trademarks
Dynamics AX, IntelliMorph, and X++ have been registered as or are under registration as
trademarks of Microsoft Corporation.
Microsoft Office System 2007, Windows 2003 and Windows 2008 are registered trademarks of
Microsoft Corporation.
Software release
This documentation accompanies Atlas version 5.0.3221 or higher and which is suitable for
Microsoft Dynamics AX V4.0 SP2 and Dynamics AX 2009 SP1 or higher and Microsoft Office 2007 or
higher.
Publication date
30/04/2012
Reader comments
Any comments or suggestions regarding this publication are welcomed and should be addressed to
the attention of:
130