• Like

Using the Dynamics AX 2012 Excel Add-In To Import and Publish Data

  • 7,394 views
Uploaded on

The Excel Add-In is an incredibly useful tool because it doesn’t just allow you to download information from Dynamics AX, but it also allows you to publish information back to the system without …

The Excel Add-In is an incredibly useful tool because it doesn’t just allow you to download information from Dynamics AX, but it also allows you to publish information back to the system without compromising the data integrity. You can use this for the initial data setup within Dynamics AX, quick maintenance of multiple records, moving data from one system to another, and even aggregating data through matrix fields. And best of all, this tool is included for free with Dynamics AX, so you don’t need to buy additional licenses in order to use it.
In this worked example we will show how you can use the Dynamics AX Excel Add-In to make updating data a breeze.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
7,394
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
451
Comments
3
Likes
6

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. © 2013. All rights reserved. USING THE DYNAMICS AX EXCEL ADD-IN Dynamics AX | Excel | Data Management The Excel Add-In is an incredibly useful tool because it doesn’t just allow you to download information from Dynamics AX, but it also allows you to publish information back to the system without compromising the data integrity. You can use this for the initial data setup within Dynamics AX, quick maintenance of multiple records, moving data from one system to another, and even aggregating data through matrix fields. And best of all, this tool is included for free with Dynamics AX, so you don’t need to buy additional licenses in order to use it. In this worked example we will show how you can use the Dynamics AX Excel Add-In to make updating data a breeze.
  • 2. © 2013. All rights reserved. INSTALLING THE DYNAMICS AX EXCEL ADD-IN Before you start working through these examples, you need to make sure that you have the Dynamics AX Excel Add-In installed. If you open up Excel and there is a Dynamics AX tab in the ribbon bar, then you are fine. If not, you will need to install it. In this section we will show you where to find the install kit and how to install it.
  • 3. © 2013. All rights reserved. Installing The Dynamics AX Excel Add-In The installation for the Office Add-Ins are included on the Dynamics AX 2021 installation kit. To find them, just select the Microsoft Dynamics AX Components from the Install group.
  • 4. © 2013. All rights reserved. Installing The Dynamics AX Excel Add-In Skip through the welcome page by clicking on the Next button.
  • 5. © 2013. All rights reserved. Installing The Dynamics AX Excel Add-In Make sure that you have the Add or modify components option checked on the next step of the dialog box and then click Next.
  • 6. © 2013. All rights reserved. Installing The Dynamics AX Excel Add-In When the Add or modify components page is displayed, check the Office add-ins option within the Client components group, and then click Next, and complete the installation.
  • 7. © 2013. All rights reserved. Installing The Dynamics AX Excel Add-In Now, when you open up Excel, you should see a Dynamics AX tab with a couple of new options for you.
  • 8. © 2013. All rights reserved. DOWNLOADING & PUBLISHING DATA THROUGH EXCEL Once you have the Excel Add-In installed, you can start using it to download, update, and publish Dynamics AX data. This is useful not only for initial data loading, but also for ongoing maintenance of the system, because it allows you to maintain records within Dynamics AX quickly through Excel. In this example we will show how you can download and publish changes to Dynamics AX records.
  • 9. © 2013. All rights reserved. Downloading & Publishing Data Through Excel You can update pretty much any data that you are able to access through the Dynamics AX client. All you need to know is where to find it. If you don’t know what table to update though, here is a quick trick. Find a form that has the data that you want to update through Excel.
  • 10. © 2013. All rights reserved. Downloading & Publishing Data Through Excel Then right-mouse-click on the form and select the Personalize option from the context menu.
  • 11. © 2013. All rights reserved. Downloading & Publishing Data Through Excel When the Personalization form is displayed, select the Query tab. This shows all of the tables that are related to the form, and if you look at the first data source, then it is usually the table that you want to access.
  • 12. © 2013. All rights reserved. Downloading & Publishing Data Through Excel To created a linked worksheet within Excel, select the Dynamics AX ribbon bar, and then from the dropdown menu of the Add data button, click on the Add Tables option.
  • 13. © 2013. All rights reserved. Downloading & Publishing Data Through Excel This will open up a table selection dialog box. You can scroll down the list to find the table that you want to add to your worksheet.
  • 14. © 2013. All rights reserved. Downloading & Publishing Data Through Excel Or you can also just type in the table name in the Filter field at the bottom of the form.
  • 15. © 2013. All rights reserved. Downloading & Publishing Data Through Excel Select the table, and then click on the > button to add the table to the selected tables. You can continue adding tables if you want, and when you are finished, click on the OK button.
  • 16. © 2013. All rights reserved. Downloading & Publishing Data Through Excel This will create a new worksheet for all of the tables that you selected to add, and also open up the field explorer on the left hand side with all of the available fields that you can select from. Note that the initial index fields are added by default to your worksheet, saving a little bit of time.
  • 17. © 2013. All rights reserved. Downloading & Publishing Data Through Excel Now from the field list on the left, select all of the fields that you want to include in the worksheet. When you have finished, click on the Fields button in the Design group of the Dynamics AX ribbon bar to return to update mode.
  • 18. © 2013. All rights reserved. Downloading & Publishing Data Through Excel When you swap from the field listing to the edit mode, you will initially have no records showing. To view all of the data that is in the company, select the Refresh button and then select the Refresh All iption.
  • 19. © 2013. All rights reserved. Downloading & Publishing Data Through Excel Now you will see all of the records from Dynamics AX.
  • 20. © 2013. All rights reserved. Downloading & Publishing Data Through Excel To add a new record, simply start adding a new line on the next available row. It will automatically extend the table showing you that you are inserting a new line.
  • 21. © 2013. All rights reserved. Downloading & Publishing Data Through Excel Also, as you are updating the records, if there is an enumeration associated with the field, then you can select it from a drop down, saving you time in trying to work out what the values should be.
  • 22. © 2013. All rights reserved. Downloading & Publishing Data Through Excel After you have added your new record, then select the Publish All option from the Publish button.
  • 23. © 2013. All rights reserved. Downloading & Publishing Data Through Excel If all of your field values are correct, and you don’t add any records that already exist, then the table will refresh and you will now see your new record.
  • 24. © 2013. All rights reserved. Downloading & Publishing Data Through Excel It will also create a new sheet called Dynamics AX Status which will show you how many records were updated, and also any errors – if they occurred.
  • 25. © 2013. All rights reserved. Downloading & Publishing Data Through Excel If we return back to Dynamics AX, then we will see the new record is there as well.
  • 26. © 2013. All rights reserved. Downloading & Publishing Data Through Excel You can use this for initial data loading, saving a lot of repetitive data updates. For example, you can use this for adding all of the common codes that you need for a new company, and even for adding new chart of accounts in just seconds.
  • 27. © 2013. All rights reserved. USING FILTERS TO UPDATE SELECT DATA The Excel Add-In has a feature that allows you to filter out the data that is returned every time that you refresh the worksheets. This allows you to easily update just the information that you are interested in. This is really useful for maintenance of data where you need to update a number of records at once that match a certain criteria, because you can download all of the records, select the items that you want to view, and then quickly maintain the fields and publish them back to Dynamics AX. In this example we will show you how to filter a table query and then update multiple records at once.
  • 28. © 2013. All rights reserved. Using Filters to Update Select Data In this example, we have queries the Vendors table.
  • 29. © 2013. All rights reserved. Using Filters to Update Select Data Since this is still an Excel table, you can filter on any of the fields.
  • 30. © 2013. All rights reserved. Using Filters to Update Select Data You can select any of the values that are in the table for the filter, and then click OK.
  • 31. © 2013. All rights reserved. Using Filters to Update Select Data This returns a subset of the data.
  • 32. © 2013. All rights reserved. Using Filters to Update Select Data Another option though is to open up the Add-In’s filter by clicking on the Filter button within the Dynamics AX ribbon bar. This will open up the filter designer. You can add a filter condition simply by clicking on the Add condition button.
  • 33. © 2013. All rights reserved. Using Filters to Update Select Data This will allow you to select a field that you want to filter on.
  • 34. © 2013. All rights reserved. Using Filters to Update Select Data And also, if you click on the … button, it will show you a list of all the valid field values that you can apply to the filter.
  • 35. © 2013. All rights reserved. Using Filters to Update Select Data You can continue to add as many filters as you want, and when you are done, click on the OK button.
  • 36. © 2013. All rights reserved. Using Filters to Update Select Data The next time that you refresh the data, you will only get the data that matches the filter criteria. This is better than the Excel filter, because all of the additional records are not returned, rather than being hidden in the traditional filter.
  • 37. © 2013. All rights reserved. Using Filters to Update Select Data Once you have your dataset that you want to update, you can change any of the field values.
  • 38. © 2013. All rights reserved. Using Filters to Update Select Data And then to update all of the selected records, just click on the Publish All option within the Publish buttons drop down list.
  • 39. © 2013. All rights reserved. Using Filters to Update Select Data The Add-In will notify you of any problems, and also confirm that the records were updated. This is useful for all of the final tweaking of data that you always do after you load all the records, and also for periodic changes to the subsets of data that you always have to perform.
  • 40. © 2013. All rights reserved. COPYING DATA BETWEEN COMPANIES Another useful way that you can take advantage of the Excel Add-In is for data migration. You have the option of selecting what instance, partition, and company that you want to upload and publish to, and they don’t have to be the same. So if you have a test and a live environment, and you want to move data between the two to ensure that you have the same configuration codes, then you can download the data from one, and then publish it to another. Or, if you are configuring a new company, then you can copy a lot of the base data from another existing company, saving time. In this example we will show how you can use the Excel Add-In to copy data between entities.
  • 41. © 2013. All rights reserved. Copying Data Between Companies In another company, I have not loaded all of my base data, so we will use our main company as the template to load the data.
  • 42. © 2013. All rights reserved. Copying Data Between Companies From the Dynamics AX ribbon bar, select the Options button from the Configure group. This will option up the data source options for the current worksheet.
  • 43. © 2013. All rights reserved. Copying Data Between Companies You can change the Legal Entity that will be used just by selecting it from the drop down list.
  • 44. © 2013. All rights reserved. Copying Data Between Companies Note also that you can change the Server to point to another instance of Dynamics AX, and also change the Partition if you have multiple instances stored within the same database instance. Once you have selected the new target company, click on the OK button.
  • 45. © 2013. All rights reserved. Copying Data Between Companies Before we refresh the data, we will save off the data from the original company for reference. This will make it easier to cut and paste the data back into the new company. So we just select all of the original table, and then copy it.
  • 46. © 2013. All rights reserved. Copying Data Between Companies Then paste the data over to the right of the main data.
  • 47. © 2013. All rights reserved. Copying Data Between Companies Now that we have the template data saved we can continue on.
  • 48. © 2013. All rights reserved. Copying Data Between Companies Return back to the linked table, and then select the Refresh All option from the Refresh drop down.
  • 49. © 2013. All rights reserved. Copying Data Between Companies Since there is no data in the other company then the linked table will be blank.
  • 50. © 2013. All rights reserved. Copying Data Between Companies Select the template data that you saved and then paste it as text into the linked table.
  • 51. © 2013. All rights reserved. Copying Data Between Companies This will add all of the data for you so that it matches the template. Although notice that I didn’t populate the Terms of Payment etc. here in this example – that’s only because those tables are not configured, but highlight that you can cleanse the data before pasting it in/
  • 52. © 2013. All rights reserved. Copying Data Between Companies Now from the Publish ribbon bat menu, select the Publish All option to push the data to the new company.
  • 53. © 2013. All rights reserved. Copying Data Between Companies If there are no errors, then the table should simply refresh itself. If there are errors in the update then you can check the Dynamics AX Status sheet to see what they are.
  • 54. © 2013. All rights reserved. Copying Data Between Companies Now when we look back into Dynamics AX then all of our new data is in the new company.
  • 55. © 2013. All rights reserved. Copying Data Between Companies Once you have created the template worksheet you can then save it away and reuse it at any time. If you really want to be clever then you can create a worksheet that has all of the common data that you need to load and re- use it over and over again.
  • 56. © 2013. All rights reserved. IMPORTING COMPLEX DATA STRUCTURES Not everything is as simple as loading one table at a time though. For more complex data structures like Products, Customers, Vendors, BOM’s etc. you may need to load multiple tables in order to get all of the data to show. You can do this as well through the Excel Add-In, you just need a little more planning. In this example we will show how you can use the Excel Add-In to create a template for loading master data within Dynamics AX.
  • 57. © 2013. All rights reserved. Importing Complex Data Structures As an example, in order to load a product, you need to populate (in this order) a minimum of three tables: • EcoResProduct • EcoResProductTranslation • InventTable EcoResProduct PK RecId EcoResProductIdentifier PK RecId FK1 Product EcoResProductMaster PK,FK1 RecId EcoResDistinctProduct PK,FK1 RecId EcoResDistinctProductVariant PK,FK1 RecId FK2 ProductMaster EcoResInstanceValue PK RecId EcoResProductInstanceValue PK,FK2 RecId FK1 Product EcoResProductDimensionGroupProduct PK RecId FK1 Product FK2 ProductDimensionGroup EcoResProductDimensionGroup PK RecId
  • 58. © 2013. All rights reserved. Importing Complex Data Structures In this example we were given a raw extract of all the products that we need to import into Dynamics AX which we pasted into our worksheet. Then to create an import template, first link in the tables that you want to load into the worksheet.
  • 59. © 2013. All rights reserved. Importing Complex Data Structures Because the raw data is not in the format that we really want to in we also created a new Product Data sheet, and then massaged the data a little to tidy up the information.
  • 60. © 2013. All rights reserved. Importing Complex Data Structures Each of the tables that we need to load will be in their own sheet within the worksheet.
  • 61. © 2013. All rights reserved. Importing Complex Data Structures We use the column headings that we have selected to populate for the sub-tables as a template column in the Product Data worksheet and then use formulas to map the fields.
  • 62. © 2013. All rights reserved. Importing Complex Data Structures Now it’s just a matter of copying the data in blocks from the Product Data sheet over to the linked tables.
  • 63. © 2013. All rights reserved. Importing Complex Data Structures And then selecting the Publish All option from the Dynamics AX ribbon bar. You can reuse this template once it’s created to load masses of data without even breaking a sweat.
  • 64. © 2013. All rights reserved. USING MATRIX FIELDS TO UPDATE MULTIPLE RECORDS There is another neat feature that available with the Excel Add-In which allows you to create new Matrix Fields. These are query fields that allow you to aggregate data and show it as one value, making some data updates even simpler. You can use this for summing data, and also segregating data into groupings such as period ranges. In this example we will show how you can use the Matrix Fields option to created total and period based aggregate fields.
  • 65. © 2013. All rights reserved. Using Matrix Fields to Update Multiple Records For example, forecast data is managed within Dynamics AX at a calendar date level.
  • 66. © 2013. All rights reserved. Using Matrix Fields to Update Multiple Records If we look at this information through Excel, then it is not really conducive to updates because it is more linier rather than the normal tabular view that most people want to work with.
  • 67. © 2013. All rights reserved. Using Matrix Fields to Update Multiple Records To aggregate the data, right-mouse-click on the table name within the field explorer and select the Create Matrix Field option.
  • 68. © 2013. All rights reserved. Using Matrix Fields to Update Multiple Records This will open up a dialog box that allows you to create a new field based on an existing field.
  • 69. © 2013. All rights reserved. Using Matrix Fields to Update Multiple Records Also you can filter the data so that you only select certain groups of values. This is useful because you can create period based fields that only apply to certain dates within the data selection.
  • 70. © 2013. All rights reserved. Using Matrix Fields to Update Multiple Records To use the Matrix Field, just create a new worksheet, and select the fields that you want to summarize to, and then add the matrix field.
  • 71. © 2013. All rights reserved. Using Matrix Fields to Update Multiple Records When you refresh the data, then you will see the matrix field summing up all of the child values. If you update any of the values, then it will prorate the changes over all of the related table records.
  • 72. © 2013. All rights reserved. Using Matrix Fields to Update Multiple Records If you take this to the next level, you can then create Matrix Fields for periods, and then use it in this case to forecast by date ranges.
  • 73. © 2013. All rights reserved. IMPORTING & EXPORTING DATA THROUGH DOCUMENT SERVICES There is one additional way that you can query and publish data with the Excel Add-In, and that is through the Document Services that are published within Dynamics AX. This is a little different from the table links, because it is accessing the data through classes, allowing you to update more than one table at a time, but also requires a little bit of coding in order to get new services configured. Luckily, there are some services that have already been deployed with Dynamics AX that you can use this on. In this example we will show how you can use the Data option within the Excel Add-In to query and publish data.
  • 74. © 2013. All rights reserved. Importing & Exporting Data Through Document Services Open the Document data sources menu item within the Document management folder in the Setup group of the System Administration area. This will list out all of the registered document services that you are able to use within Dynamics AX.
  • 75. © 2013. All rights reserved. Importing & Exporting Data Through Document Services To use these with Excel, select the Add Data option from the Add Data button of the Dynamics AX ribbon bar.
  • 76. © 2013. All rights reserved. Importing & Exporting Data Through Document Services When the Add Data dialog box is displayed, you should be able to see the same data sources. Note, some of the data sources have pencils in the icon, this indicates that you can publish the data through them – otherwise they are just read only.
  • 77. © 2013. All rights reserved. Importing & Exporting Data Through Document Services The data services work exactly the same way as the tables, by showing you all of the available fields that you can add to the sheet.
  • 78. © 2013. All rights reserved. Importing & Exporting Data Through Document Services Just select the fields that you want to use, and drop them onto your sheet.
  • 79. © 2013. All rights reserved. Importing & Exporting Data Through Document Services When you switch to edit mode, you can refresh the data, and then retrieve all of the records.
  • 80. © 2013. All rights reserved. Importing & Exporting Data Through Document Services If you want, you can also create Matric Fields as well to reformat the way that the data is displayed.
  • 81. © 2013. All rights reserved. SUMMARY In this walkthrough we showed how you can use the Dynamics AX Excel Add-In in a number of different ways to query, and also to publish data. It is a great tool to use to create update templates and also to make a lot of periodic update tasks a lot easier.
  • 82. http://slideshare.net/murrayfife/presentations Murray Fife Microsoft MVP