Basic Techniques of Troubleshooting SmartConnect Map errors

Today is Tech Christmasand we are going to review couple of ways to troubleshoot a SmartConnect map that is generating errors when it is run. I will start with simple errors and simple troubleshooting techniques.

In this example I have a sample map with sample data which will import vendors into Dynamics GP 2010. After mapping all the fields that I need to populate, I ran the map.

In the progress screen we can see that only 8 out of 10 records were successfully integrated into GP. So what is wrong with 2 other records?

Lets click on the error message and see what is the reason for this issue.

Ok, we can see a standard eConnect error message. Description of the error states that vendor name is empty.  I don’t remember having blank vendor name fields in my sample data. I clicked on Fix button at bottom right corner of progress window to have a closer look at the records that failed.

Oh! SmartConnect was right! As usual! I can see that 2 records do have blank fields in VENDNAME column. I can fix this issue “on fly” by manually typing in Vendor names into these empty fields:

Once I finished correcting the vendor names – I want these 2 records to join their mates in the GP company database. I click on the Run button. This will rerun the original map for just these records displayed in the SmartConnect process Errors window – but for the updated data. Now all my vendors were successfully integrated in to GP.

Let’s throw in a twist. What if I don’t want to import them? I just want SmartConnect to skip records with blank vendor names as they are invalid, without throwing errors. My favorite Integration tool can do it easily! Let me show you how.

I open SmartConnect Mapping window and click on Restrictions button. In restrictions window I expand Source Column section to display all my source columns as I’m going to use one of them as a variable in my script. I want to restrict SmartConnect from trying to import records that do not match my criteria.

In this example the restriction will be in English as follows:

If Vendor Name field is empty
skip the record
Otherwise
Try to import the record.

I use VB.NET to write my scripts, but SmartConnect knows C#.NET as well.

On the screenshot in my script I used VendName with _ prefix as it is required by SmartConnect in order to recognize it as a variable. The next time you’ll run the map, SmartConnect will automatically skip these records.

To demonstrate another way of troubleshooting errors I will use a simple map that imports customers into GP.  When I try to run the map I get the following error:

The error message gives me a direction in which I should start troubleshooting the map.

My dates that I’m trying to import are in incorrect format. It would be very useful to see the data(xml document) that SmartConnect generates and sends to GP through eConnect. SmartConnect can help us troubleshooting this issue and show the content of xml document.

On the Map Setup screen, I will change the destination to Microsoft Dynamics GP – File and enter a file path for files that SmartConnect will generate in the future.

I ran the map and opened a directory that I specified. Don’t be surprised to find heaps of xml files as the amount of documents will match the amount of records of your data source.  When I opened one of xml files, I discovered that CREDIT CARD EXIRATION DATE (CCRDXPDT) has an invalid date format.

Exactly what I thought! This xml file was extremely helpful. Now I know which field is problematic (remember that you can have multiple date fields mapped and it will make troubleshooting more difficult that’s why it is important to see which one is wrong one), I also can see the actual (invalid) format so it will be easy to write a script that will convert the date to a proper one.

But don’t forget it is SmartConnect we are working with. It does all the work for you and you don’t need to write a script to convert the dates. SmartConnect still can’t read your thoughts, but believe me, we are working on it.

To fix this issue we need to open a Mapping window.

  1. Go to Additional columns and click on Date Calculation and add a column.
  2. Enter Name of the field.
  3. Select a Source column that contains the date, you need to convert.
  4. Select the Source Format, the format of your source date. In my case it was day/month/short year.
  5. In the last drop down box select predefined date format called “GP Date Format” this is the format GP can understand.

* You can also define your own date formats, by clicking on Manage Formats button.

6. Now click on OK and map the Date Calculation column (I called it DATECALC) to Credit Card Expiration Date in the destination.

All done! Run the map. SmartConnect will convert the date to the correct format.

In this article I reviewed basic troubleshooting techniques which will make it easier to make integrations to GP. In my future articles will review advanced troubleshooting techniques which are required when you work with complex integrations.

Please, leave your feedback. Let me know if it was useful and what would you like to see in my next Tech Tuesday articles.  Remember, SmartConnect makes life easier!

Alex Sugak

QA Team Leader