Today's #TipTuesday is a tip for those Dynamics GP customers using eOne Solutions' SmartConnect. I often have a situation where I want users to select which company to integrate into themselves, instead of defining a single company on a map. What I'll show in this post also opens up the possibility of integrating data into multiple company databases from one map as well.
Company selection
When creating a map in SmartConnect for a Dynamics GP destination, many users would typically click on the Companies button and select the company or companies they want the map to integrate into. I've blurred out my company names but I have several to choose from. However, I have not selected any in this map (a GL transaction map in this case). Why not?
Well, I'd rather put the company selection in the hands of the user running the map and I choose to do that via the Define function. For many of the maps I created for our staff and clients in my previous consulting life, the things they want to integrate aren't limited to 1 company. At the very least many customers want to upload into a Test company to test something before integrating into a regular production company. This is where the Define functionality (under the Companies button in SmartConnect) comes in.
How to use it
In the Companies window, leave the companies themselves unchecked. Click on the Define button. Ensure the data source has a company column (it can be named anything, "company", "database", etc.). As long as there is some data in the source that I can determine what database to integrate to, I can use the Define feature (for instance, with If/Then statements to tell SmartConnect what to map to when).
In my case, I have the users put in the actual database name in the "Company" column in the source Excel templates. If I wanted to make this "next level", I could have the users put in a code for the company that they would easily remember and use some IF/THEN statements in here to map from the shortcode to a database name (for example, the users could put keywords in such as TEST or PROD).
In the simplest form, if the source document template has the database name like mine does, I simply want to define the company as "return" and the field name that contains the company. If that will not be the actual SQL database name, this needs to be expanded into an If/Then code block to translate the input into a database.
Integrating data into multiple companies
Where else could I use this? I could integrate data into multiple companies in one map at one time. For example, at a previous client, I created a template for their month-end journal entries. They would have a standard set of entries that are for various companies. Their template was in Excel and they had multiple entries on one tab, with entries for different companies. They would run the map once and with this Define feature, SmartConnect would integrate the journal entries into each company, seamlessly, as if they had run the integration once per company.
That's it for this tip, I hope it was useful!