Skip to content


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.

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 “Chi”
Return  “CHI”

Case Else

‘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.


Chris Dew
Director of Product Management


  1. Beat BUCHER on July 9, 2013 at 9:18 pm

    Great article! Though I haven't started yet to use SmartConnect, I can't wait to try that multi company ability…

  2. Beat BUCHER on July 9, 2013 at 9:18 pm

    Great article! Though I haven't started yet to use SmartConnect, I can't wait to try that multi company ability…

  3. Beat BUCHER on July 9, 2013 at 9:18 pm

    Great article! Though I haven't started yet to use SmartConnect, I can't wait to try that multi company ability…

  4. Abarshini on September 18, 2013 at 12:59 am

    Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!

    Web Development Services in Chennai

  5. Cindi Todd on June 13, 2016 at 9:44 pm

    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?

    • Chad Bruels on June 21, 2019 at 10:50 am

      I’m guessing this isn’t possible. But if it is, I want to know how as well.

      • Chad Bruels on June 21, 2019 at 11:51 am

        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.

  6. Kevin Lehoullier on March 29, 2018 at 3:38 pm

    This is an old post but if someone is monitoring what is the syntax for case or if then else for multiple company selection?

    case when co
    ‘CO1’ then ‘CO1’
    ‘CO2’ then ‘CO2’
    else blanks

    • Patrick Roth on July 15, 2020 at 1:35 pm

      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.

  7. Adan Torres on July 11, 2020 at 10:36 pm

    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


    CASE “NST”

    CASE “NSN”

    CASE “NSI”

    CASE “NSU”

    return string.Empty

    • Patrick Roth on July 15, 2020 at 1:39 pm

      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.

Leave a Comment


Popdock Data Lake Upload Tool - Free Training on April 5th
eOne Sessions at Directions North America 2023
Connect with eOne Solutions at Directions North America 2023!
Tech Tuesday: Creating a Summarize List by States Between Two Systems
eOne Sessions at Days of Knowledge UK - Live from Birmingham!


2016 SmartConnect Integration Bootcamps
Tech Tues: Automatically refreshing Pivot Tables in Excel Refreshable Reports
Happy Thanksgiving from the eOne team!
2017 SmartConnect Integration Bootcamps
New Releases of Extender and SmartList Builder



Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Meet the Team Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships Partner All Hands Call Popdock promotions release SalesForce SmartConnect SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.