SmartConnect Before/After Document tasks

SmartConnect can be used to integrate documents into your system (I use Dynamics GP and Business Central, it works with both)

If possible, I'd like the source table to be SQL, so that I can mark the records as having succeeded or failed. 

This tutorial will detail how to use the before/after document tasks to run a SQL task. 

*** if I've not provided enough information, please leave a comment and I'll clarify it.

Open the map

Go to the Tasks tab

Right click on Tasks that run after, choose New Task > Run SQL command

Edit the form to look like the screen shot below. Best to use a dedicated SQL user account. 

Note that we're using the 'last error' and 'invoice number' variables. You get access to them by clicking on the Insert Variables button. Note that we had to add single quotes, SC is just doing a text substitution


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences