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 support@eonesolutions.com.

Leave a Comment


Tech Tuesday: Accessing the Real-time Request Log in SmartConnect.com
Tech Thursday: New Field Types in Extender
Integrations from Excel to Microsoft CRM - A Match Made in Heaven
eOne GPUG Summit Sessions
SmartConnect 2018 now compatible with Microsoft Business Central October Release


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



open all | close all


CRM Demo Dynamics Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News eOne Spotlight ERP Events Excel Excel Report Builder Extender Extender Enterprise Flexicoder GP GPUG integration integration manager Meet the Team Microsoft Microsoft dynamics crm Microsoft Dynamics GP MSDYNGP Office Relationships partners release SalesForce SalesForce.com scripting SmartConnect SmartList SmartList Builder SmartList Designer SmartView SQL Support Tech Tuesday Templates training Zendesk

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.