Troubleshooting SmartConnect Data Issues
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
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.
- Go to Additional columns and click on Date Calculation and add a column.
- Enter Name of the field.
- Select a Source column that contains the date, you need to convert.
- Select the Source Format, the format of your source date. In my case it was day/month/short year.
- 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!
QA Team Leader
Troubleshooting SmartConnect Data Issues
December 23, 2011
Â· Martin Â· No Comments
Tags: contributors, deliciousfalse, dynamics, econnect, googlebuzztrue, integration, ipad, smartconnect-sp, SmartView, technoratifalse, troubleshooting, upgrade Â· Posted in: Blogs I Follow Total Views: 3,034