Skip to content
+1-888-319-3663

EONE BLOG

Tech Tuesday: SmartConnect and Task Results


On any task that is added to a SmartConnect map, there is a section where the returned result from the task can be defined. By default, it is set to “Go to next step” for a successful task run and “Quit” for a failure. There is a third option that can be selected though called “Cancel processing” that can also be assigned. Each of these options produce slightly different results based on where the task is being run.

Task: Run Script

First off, a task will report success if it runs through its actions without encountering an error. A scripting task uses the statement “Return True” to denote that it has been successful. On the flip side, if a task encounters an issue/error or a script executes the statement “Return False” then the task will report a failure.

The “Go to next step” option will always function in the same manner, which basically tells the map to continue what it was doing – either running the next task or document in the process.

The “Quit” option has 2 slightly different results based on what task returns that result. If the task is a pre- or post-map task, then the entire map will stop at that point and report a failure. So if this occurs in the pre-map task the map can be stopped and report an issue before any records are run through.

If a document level task returns the “Quit” result, then that particular document/record that was being processed returns an error – but the map continues running the other records instead of ending at that point. If the pre-document task returns this result, it also stops any data that would have been sent through. If it is a post-document task then the data for that record may have already been submitted successfully since the task doesn’t start until the document has been submitted.

The “Cancel processing” option functions the almost the same as the “Quit” option. The only difference is that the map will not report a failure for that option, it will just end the map or prevent a document from being sent through. That makes the “Cancel processing” option useful when trying to prevent a map or recording from running but a failure event isn’t desired. Any post-map failure tasks would not be triggered by this return result.

The two screenshots below show the difference in what SmartConnect reports when using the “Cancel processing” and “Fail” results at the document level.

SmartConnect Progress
SmartConnect Progress Fail
The first screenshot shows the “Cancel processing” result, which just prevents one of the records from running through. The “Quit” result returns an actual error, and fires of any post-map failure tasks such as emails.

If you have any questions feel free to leave a comment below or email sales@eonesolutions.com!

5 Comments

  1. Aaron on March 23, 2017 at 3:43 pm

    Chris, is there a mechanism or best practice for canceling a scheduled map when an error occurs?

  2. Patrick Roth on March 29, 2017 at 9:46 am

    Aaron,

    Not once a map is executing, no. At the start, we can do a Before Map task and cancel the map – but that is our one shot at doing that. At the point of an error, the only way you would be able to stop records from integrating would probably be to filter then out at the mapping Restriction level or using a Before Document script to stop them from being sent.
    But you won’t be able to stop the map.

  3. Darren on June 4, 2020 at 11:49 am

    your guy David says I shouldn;t use the ‘Run SQL Command’ as a map task since it is broken and he doesn’t know why. I should use ‘Run SQL script’ as that works. so why do you include ‘Run SQL Command’ as an option if you don;t support it?

  4. Patrick Roth on June 8, 2020 at 3:10 pm

    There is no “Run SQL script” option – perhaps you mean “Run Script” which is .NET scripting (where you can make your own ADO connections if you wish).

    Run SQL Command works fine – lots of people use them. I always do if I can – that way I don’t have to write my connection stuff myself, even if it IS boilerplate.

  5. Darren on June 12, 2020 at 11:00 am

    sorry. I typed script instead of command. thank you for the grammar correction.
    that aside. agree to disagree. the ‘Run SQL Command’ task does not behave correctly. I am in the process of converting my ‘Run SQL Command’ tasks to ‘Run Script’ tasks as running as script works and is supported and ‘Run SQL Command’ does not and is not supported. this ‘not supported’ was confirmed by David at SmartConnect.

    for the record – I have a sequence of tasks. They all execute their logic correctly. the issue is that is all of the ‘Run SQL Command’ tasks execute successfully and the Map ends reporting failure and stop [processing. David at SmartConnect says to not use their ‘Run SQL Command’ logic.

Leave a Comment





RECENT POSTS


eOne at Summit North America 2021
Employee Spotlight: Megan Tripp, Business Development Representative
eOne is now compatible with Microsoft Dynamics GP October 2021 Release
October 2021 Releases of Extender, SmartList Builder, SmartView, SmartPost, and Flexicoder are Now Available
Advanced SmartConnect REST Web Services Integration - October 2021

POPULAR POSTS


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

CATEGORIES

TAGS

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 partners Popdock release Reporting SalesForce SalesForce.com SmartConnect SmartConnect.com 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.