Skip to content
+1-888-319-3663

COMMUNITY FORUM

Email global errors issue.

Dan asked 3 years ago
All I put in the following globals in an email task when the file fails.  I set up a test for 3 records to fail.  When I run the map the three records fail. I do get an email with an attachment with the failed 3 records.  However the error count show 2 records and the error mesaages are for just two records.  What am I missing?
Errors from Razor Import
Map:  GlobalMapDescription   – works 
Run:   GlobalRunDate  works
Error Count:   GlobalErrorCount  2 instead of 3?
Errors:  GlobalRunErrors  same issue as above
Answers
Patrick Roth Staff answered 3 years ago
Dan,
Always best to note your version of SmartConnect when asking a question (or running into something odd).  Helps to determine what kind of solution you require.
I’m going to guess that you are running SC 2017 or SC 2018 as there was a problem with the built-in global variables on these versions (that as of SC 20.18.1.14 isn’t resolved).
The workaround is:
1. create a script task and paste in the following VB.NET script. If using C#, you’ll have to convert it.  The event will be the same as your email task (likey ‘after map fails’)
Dim My_String as string
My_String=GlobalAdministratorAddress
My_String=GlobalBCCAddress
My_String=GlobalCCAddress
My_String=GlobalFileName
My_String=GlobalFilePath
My_String=GlobalFromAddress
My_String=GlobalMessage
My_String=GlobalToAddress
My_String=GlobalErrorCount
My_String=GlobalLastError
My_String=GlobalMapDescription
My_String=GlobalMapID
My_String=GlobalProcessCount
My_String=GlobalRollingColumn
My_String=GlobalRunDate
My_String=GlobalRunEnded
My_String=GlobalRunErrors
My_String=GlobalRunNumber
My_String=GlobalRunStarted
My_String=GlobalSuccessCount
My_String=GlobalUserID
return true
2. Make sure you re-order the tasks so the dummy task above comes before the real email task.
Your values should be correct now.
 
 
Dan replied 3 years ago

Thanks – SC2018 and the script fixed it.

Farooque Shaihsorab replied 2 years ago

Hi Patrick,

How about attaching a file that got integrated successfully to an email task. I do not see any option in Smart Connect.

David answered 2 years ago
I ran into this today and your workaround fixed our issue. Thanks!

If you would like to submit an answer or comment, please sign in to the eOne portal.