Tech Tuesday: Using Multiple Companies in SmartConnect
As we are getting very close to releasing new SmartConnect Excel Templates for Dynamics GP I am reminded of some really great features we have inside of SmartConnect. Today I want to give you a little insight into using multiple companies from your Dynamics GP implementation.
The new templates will allow you to pick which Dynamics GP company and send transactions into that company without reconfiguring the SmartConnect map each time. How did we do this? The answer is simple, inside of the Map in the Companies button for the destination. Normally in this window you would choose a specific company and check the box to have transactions created in that company. You do have the ability to create records in multiple companies by selecting each desired company. Why would you do this? Great question, and I think there are a variety of answers but here are a couple to think about.
Select Case _mySource
Case “Far”
The new templates will allow you to pick which Dynamics GP company and send transactions into that company without reconfiguring the SmartConnect map each time. How did we do this? The answer is simple, inside of the Map in the Companies button for the destination. Normally in this window you would choose a specific company and check the box to have transactions created in that company. You do have the ability to create records in multiple companies by selecting each desired company. Why would you do this? Great question, and I think there are a variety of answers but here are a couple to think about.
1) You have a master database of Accounts, Customers, Vendors, Employees and you want to synchronize those records.
2) You want to use real-time Dynamics GP triggers to automatically create these records in other databases.
Another option is to not have any companies selected at all! How would that work? Well, we have a way to use data from your source to select which company the record should be using for integration. Let me explain a bit more, if you have a field of data that has your company id (database name) you can simply pass that in by using the define button on the companies button and returning that fields value. A simple example script is below:
Return _GPCompanyID
You can also get a lot more sophisticated if you don’t have a specific field that spells out your company id by using a case statement like below:
Select Case _mySource
Case “Far”
Return “FAR”
Case “Gra”
Return “GFL”
Case “Gra”
Return “GFL”
Case “Chi”
Return “CHI”
Return “CHI”
Case Else
‘If no match is found, return an empty string
Return String.Empty
‘If no match is found, return an empty string
Return String.Empty
End Select
Now you can do things like bring in Journal Entries into multiple Dynamics GP companies with one pass instead of running multiple maps.
I hope today you may have been inspired to try new options in how you setup maps.
Thanks,
Chris Dew
Director of Product Management
Director of Product Management
Chris,
Great article! Though I haven't started yet to use SmartConnect, I can't wait to try that multi company ability…
Beat
Chris,
Great article! Though I haven't started yet to use SmartConnect, I can't wait to try that multi company ability…
Beat
Chris,
Great article! Though I haven't started yet to use SmartConnect, I can't wait to try that multi company ability…
Beat
Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!
Web Development Services in Chennai
This is great! Have you ever used this with a GP rolling column? In other words, have you been able to pass the company defined through to that GP rolling column field?
I’m guessing this isn’t possible. But if it is, I want to know how as well.
I was just told by a colleague that \”even though you must select a Company ID in the GP Rolling Column window, if the map detects that Define is used instead of the company selection checkbox, it will call the correct company stored procedure during integration\”. I confirmed this functionality worked for my client.
This is an old post but if someone is monitoring what is the syntax for case or if then else for multiple company selection?
e.g.
case when co
‘CO1’ then ‘CO1’
‘CO2’ then ‘CO2’
else blanks
end
This is an old question by now too. But here I believe you are asking “can we use the Define to return multiple DBs for my destination” – the same way we can select multiple destination checkboxes.
No, currently SC doesn’t have a way to return multiple DBs via the Define button code.
Hi Patrick, does SC have the ability to do this now?
Husain,
No, you still cannot use the “Define” feature to send data into more than 1 company using data in your source file. However if the data is always going to the same companies (i.e. not using the Define window) then you can select multiple companies on the previous destination window, if you check off 2 companies, it will send data into both companies. Typically you would only use this option if you are adding the same data to multiple companies. For example, you have the same chart of account in multiple companies, and you want to import the same accounts into ALL your companies, you can open the Companies window and check off multiple companies.
Hello im using this option, but when the gp transactions has been created im receiving a duplicate amount on a payble transactions, i mean i hope to receipt a purchase and total amount for 500 usd and im receiving a amount for 1000, i dont understand why, could someone help me to understand what’s going on and how can i fix it , see my define company rule below
SELECT CASE _REPORTORGUNIT2
CASE “NST”
RETURN “NST”
CASE “NSN”
RETURN “NDSRT”
CASE “NSI”
RETURN “DGINV”
CASE “NSU”
RETURN “ZONA”
CASE ELSE
return string.Empty
END SELECT
Using the “Define” button code to determine your company vs marking the checkbox wouldn’t cause the “my amount for the pop receipt transaction is doubled” issue you note.
You’d have to check to see what fields are mapped to what in the integration and verify the data being integrated to see if its the data you expect.
If the data is correct (the numbers show what you expect) – then you’d have to see what your mappings are. Perhaps you have a calculation that is wrong (if using one) or else field set to “SUM” when it shouldn’t be.