Skip to content


Tech Tuesday: Automatically set the 1099 amount on a payables transaction

I often run into people importing payables transactions using SmartConnect where some of the vendors are 1099 vendors and some are not.  When you import a transaction for the 1099 vendor, the 1099 amount needs to be the same as the transaction amount.  However, people don’t typically know which vendors are 1099 vendors before they run the import.  This article will explain how to automatically determine if the vendor is a 1099 vendor, and then update the 1099 amount only for those transactions.  We will do this by creating a calculated field for the 1099 amount that will connect to SQL and then check what the 1099 status on the vendor is. 

First thing we need to do is create a new “MSSQL Default” connection to use in our script.  In order to do this, open SmartConnect, go to the Maintenance tab, and then click on the “MSSQL Defaults” button and then click on the “Add” button

Once you are in the “Default Microsoft SQL Servers” window, you then want to create a connection to the specific company you are running the map into.  In my case, I am using my Fabrikam company, which in my database happens to be called “GPTWO”.  You should actually use SQL authentication in this window, if you change it to “Use Windows Authentication” you will need to add all the windows users to SQL in order for them to run this map.  I have set mine up using the sa user, however you can use any SQL user that is a member of the DYNGRP in this specific database.

After creating your default SQL connection, next we need to create a calculated field.  Open up the payables transaction mapping, and then click on the “Additional Columns” button, and then select “Columns” and “Calculated.”

Name your calculated field TEN_NINETY_NINE_AMT. Erase the default script in the window, and then paste the attached text file into the Calculation Field.  After pasting the script into the window, the window will look like this.

You need to edit just 3 locations in the script.  I have circled them below. 

You need to replace _VENDORID with the name of the source column that contains your vendor ID.  You need to replace _AMOUNT with the name of the source column that contains your document amount.  You need to replace _SQLDEF_GPTWO with the name of the default SQL connection you created in the first step of this document.  In the screenshot below, I am dragging and dropping the fields from the “Fields” window into the script window to make sure I don’t mistype any of them.

After updating the script with the correct field names, press the validate button.  If the script doesn’t validate, it means one of the three fields you dragged into the script are mistyped.  Once you get the script to validate, click the OK button to close the script window. 

After the script is saved, then you can map the field by dragging and dropping the field into the “1099 Amount” mapping. 

Have questions? Give us a shout at


  1. GREGORY T MOORE on January 23, 2019 at 7:54 am

    worked like a charm….:)

  2. Sharon Burley on December 23, 2019 at 11:41 am

    if a user needed to switch between their Test company and Live company when running the map, how does that affect the Microsoft SQL Server settings? Would they have to have two different maps or is there another way to go about that? Could this be done as a task instead of a calculation?

  3. Patrick Roth on December 26, 2019 at 8:59 am



    This will flip the context to whatever the company destination on the map is

    • Sharon Burley on December 26, 2019 at 11:43 am

      Thank you so much!!

  4. Talon Meyer on January 6, 2020 at 4:56 pm

    You anticipated my need again. Thanks, Patrick.

  5. James Peto on August 22, 2022 at 2:51 pm

    If you could, please show the remaining part of the calculated field under the Catch.

Leave a Comment


eOne Welcomes Incremental Group as a New eOne iPaaS Integration Partner
Employee Spotlight: Floyd Jones, Front End Developer
NEW WEBINAR: Popdock Onboarding - Fall in Love with Your Data
Employee Spotlight: Calum McGrath, Implementation Consultant
A Pricing Update Regarding the SmartConnect Perpetual Plan


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.