Tuesday, November 26, 2013

Tech Tuesday: Email Task Functionality

Our Senior Technical Consultant, Chris Hanson, will be taking us through this week's Technical Tuesday:

Today we are going to look at the email task that you can attach to any SmartConnect map that you have setup. The most common use of this that I see is to use it on the Map Failure section to alert a user that something has gone wrong with the map if it is an automated (scheduled or real-time) map. 

The amount of data that you can pass back and customize within the email task is fairly extensive. One option that we have, using system global variables to pass data back through the body of the email, has been around for a while. In the screenshot below I have placed different global variables in the task so that it will report the map id, run number, run date, and a list of all the errors encountered on the map run.  

You can do this with any global variable, whether it is a user variable or a system one, but the system variables will be populated by SmartConnect – so you don’t have to put data in them in the first place to use them in a task.


The other options that are new to the latest builds of SmartConnect are the 2 checkboxes highlighted in the image. These will tell SmartConnect whether or not to attach additional files to the email when it is sent. The first check box, the validation errors, will attach a file that lists all the rows of data that fail any SQL validation tasks that were setup on the map. SQL validation tasks can be added at the Before Map section and check any data in the source against a SQL table/view and prevent any data to be processed on that map run if it fails. With this option marked on the email the user will see the failed rows in that file, rather than having to come back to the map to figure out what went wrong.

The second check box, the process errors, will attach a file with data that failed if you are not running any SQL validation and instead the record fails when trying to be submitted. This is different in the sense that the map is running through every record at this point and each record is either submitted or failed. Those failed records are then recorded and dumped into the file that the user can use as the new source for the next map run, so only failed records are attempted to be re-uploaded.

If you want to learn more about SmartConnect please feel free to reach out to us at sales@eonesolutions.com or check our our Knowledge Base! 

Thursday, November 21, 2013

SmartView: why I love it, why I think you will, and a special promo

What in the world did we do before this?! That was the question I found myself asking not too terribly long ago after having SmartView External (part of the SmartView Bundle) installed on our system. Well – I know the answer – in trying to get at my sales numbers, I sorted through lists of invoices in GP, cross referenced reports from outside systems, and overall spent way too much time trying to find my data. 

Enter SmartView External. 

My life suddenly got a whole lot easier. I can access my SmartLists right from my desktop, not having to worry about logging into GP and not staring at a blank screen for minutes at a time to see a simple list. From SmartView External, I can rearrange my report to group and subgroup exactly the way I want. I can see my totals on screen – without having to export to Excel and I can add as many filters as I want. Not to mention the fact that I am getting the latest info from GP. 

Last week, I traveled to New York City to visit some of our favorite partners and customers. At that time, I shared the ease of using SmartView External and told them exactly how I use it in my day to day life. I cannot begin to tell you how many customers stared in amazement after sharing with them that they can see their SmartLists without logging into GP. A common response was “you mean to tell me that I can have our managers out of GP and just give them access to this?!” Yep – exactly. 

SmartView External saves me time every single day which is why I’m passionate to share it with our customers and partners. Before I tell you the promo around SmartView, let me give you the top 5 reasons I think you may want to use it:

1. You’re a SmartList addict.
  • Replace SmartList and use SmartView instead. I’ve already told you why I use it, but take 3 minutes to see for yourself here

2. You currently use SmartList Builder. 
  • If you have created the lists you need, pulling the data from the places you need it – then view it in SmartView. It's a whole lot easier than viewing it in SmartList.

3. You are sick of SmartList taking up your time while waiting for a list to load.
  • In an instant world, you need your lists right away. SmartView gives you just that.

4. You have a need for more than four filters on a SmartList.
  • Enough said? If you’re like me, you can use up those four allotted filters in about 10 seconds. Use SmartView and add as many filters as you want. 

5. You have way too many people in GP for the sole purpose of seeing a SmartList. 
  • Cut out the expensive user licenses and give those users access to SmartView External. 

Sound like something you could use?? 

Right now, we are offering our SmartView Internal/SmartView External bundle for $2000 + 17.5% annual maintenance. (Normally $3700 + maintenance.) Note: You need to have both SmartView Internal and SmartView External in order to use the External functionality.

When you are ready to place the order, have your partner use the coupon code SVBUNDLE in order to apply the discount. The promo ends December 31, 2013 so please place orders by that date in order to receive the discount. 

I truly hope you check out SmartView so you can take advantage of all the benefits. Want to know more? Shoot me an email: abbey.cooper@eonesolutions.com. 


Tuesday, November 19, 2013

Tech Tuesday: Creating and Using SmartConnect Script Templates

This week's Tech Tuesday article is from our Director of Professional Services, Lorren Zemke, who has provided a starting point on using the Script Templates in SmartConnect.
 
One of the lesser used features of SmartConnect that has some great potential are the Script, SQL and Mail templates. Templates allow users of SmartConnect to create .NET Scripts or SQL Code that can be pulled into any map through calculated columns or map tasks as a starting point or a complete set of code to be executed. The script templates are available for any SmartConnect map and not limited to a specific connector. 

This article will help you get started on using the Script templates to create a quick method for code reuse.  

Start by opening SmartConnect and clicking on the Maintenance Tab. You will see the three templates available with SmartConnect.
 

Click on the Script button to open the Task Script window. Don’t worry, these scripts can be used in calculated columns as well. If you have not created your own scripts, there will be some defaults created as part of your SmartConnect installation.


Click the Add button to open the Script Template window.
 

 

Give the Template a name. We’ll call this one EXECUTESQLCOMMAND_VB.
Choose the language type to use for this script. You can use either C# or VB.NET.  If you want to have both available, you will want to create two templates.
Enter the Template Description. We’ll call it “VB Script Template for Executing SQL Code.”
--------------------------------------------------------------------------------------
Now, enter your script code. Remember, all .NET Scripts in SmartConnect must return a value, so keep that in mind when entering your template code.
This example is used to allow for quickly executing a SQL procedure or script and using a Data Reader to grab the values from the results. The code is pretty generic so you may need to change or add code as needed to fit your specific need. A great resource for learning .NET coding is the Microsoft Developer Network. http://msdn.microsoft.com/en-us/library/k1s94fta(v=vs.71).aspx
'--------------------------------------------------------------------------------------
' Script Name:  Execute SQL Command
' Created On:   2013-Nov-18
' Author:       Lorren Zemke
'
'  Executing a stored procedure within a calculated field to return a single data element
'  This script uses a Data Reader to loop through the rows to get the value of the last row.
'
' History:     
'---------------------------------------------------------------------------------------
'
'----------------------------------- CONFIGURATION -------------------------------------
Dim mapInterface As Integer = {TV_SCHEDULED}
'---------------------------------------------------------------------------------------
Try
    '******************************************************************
    ' This section is used to set the connection string to execute the stored procedure
    '
    ' Requires setting up MSSQL Default servers from the Maintenance tab
    '
    'Declare the connection string based on the configuration variables
   
Dim conString As New String({TV_SQLConnection})
      
    ' Set connection string based on the company defined at the destination
    ' to match the company connection string
    '
    'If _COMPANY = " TWO" Then
    '           conString = _SQLDEF_TWO
    'Else
    '           conString = _SQLDEF_OTHERCOMPANY
    'End If
    '*******************************************************************
  
    'Create the SQL connection and open it
    Dim myConn As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(conString)
    myConn.Open()
    'Define the query command to be run
    Dim sqlCode As String = "{TV_STOREDPROCEDURE}"
    'Declare the SQL command as the query string
    Dim myCmd As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(sqlCode, myConn)
    myCmd.CommandType = System.Data.CommandType.StoredProcedure
    '-------------------------------------------------------------------------------
    ' Add SQL Stored Procedure parameters here
    ' myCmd.Parameters.AddWithValue("@ParameterName", _ParameterValue)
    '-------------------------------------------------------------------------------
    'Define the SQL Reader and execute it
    Dim sqlReader As System.Data.SqlClient.SqlDataReader = myCmd.ExecuteReader()
    Dim result as string
    Try
       
        'Read the line
        if sqlReader.HasRows then
              while sqlReader.Read()
                           result = sqlReader.GetValue(0)
                           ' Add Logic as needed
                     end while
        end if
        Return result
    Catch ex As Exception
              If (mapInterface = 1) Then
                     System.Windows.Forms.MessageBox.Show(ex.ToString())
              End If
              Return String.Empty
      
    Finally
              sqlReader.Close()
              myConn.Close()
    End Try
Catch ex As Exception
       If (mapInterface = 1) Then
              System.Windows.Forms.MessageBox.Show(ex.ToString())
       End If
Return String.Empty
End Try
You will notice some of the text does not follow standard .NET coding conventions or syntax. Those are the strings inside of the brackets “{ }”, usually starting with TV, which stands for Template Variable. These are replacement variables that are replaced when the template is created in a script to speed up the coding process. 

To create the Template Variables, click on the Manage Variables button.

 

For this script, we need to create two new Template Variables. 

In the Variable Name field, enter TV_SQLCONNECTION and click Add. This will insert the variable into the list. 

Change the Data Type to Constant. 

Enter a Prompt Description.

Enter the next variable name, TV_STOREDPROCEDURE in the Variable Name field and click add. 

Change the Data Type to Constant 

Enter the Prompt Description.

 

Click OK to save the new Variables. 

Click OK on the Script Template window to save the script.

---------------------------------------------------------------------------------------------------- 

To use the script as a task or calculated field, go to a task, such as a task that runs before a document.  Click on Run Script.



With the empty script window open, click on the Load Template button.
 

 

Select the desired template:
 

When we select the template we will be asked to replace the Template Variables with the intended values we want to use for this script. 

You will notice there are three variables to replace.  You can choose to enter a value or just continue and replace them later.

TV_SCHEDULED – This variable is used to determine if we should display an error dialog should one occur.  If we select GBL_MANUAL (or 1) as our value, we can display the dialog.  If we select GBL_SCHEDULED (or 0) as our value, we don’t display the dialog since no use is monitoring the processing. 

TV_SQLCONNECTION – This will be used to set the SQL Connection string.  If an MSSQL Default connection was created in SmartConnect (a topic for another Tech Tuesday), you can use that value as well. 

TV_STOREDPROCEDURE – The Stored Procedure name that will be executed in this script.  This could also be T-SQL code that isn’t specifically a stored procedure.

 

Once the replacement values have been entered, click OK.  We will get the same script from our template but the Template Variables will be updated.
'--------------------------------------------------------------------------------------
' Script Name:  Execute SQL Command
' Created On:   2013-Nov-18
' Author:       Lorren Zemke
'
'  Executing a stored procedure within a calculated field to return a single data element
'  This script uses a Data Reader to loop through the rows to get the value of the last row
'
' History:     
'---------------------------------------------------------------------------------------
'
'----------------------------------- CONFIGURATION -------------------------------------
Dim mapInterface As Integer = GBL_MANUAL
'---------------------------------------------------------------------------------------
Try
    '******************************************************************
    ' This section is used to set the connection string to execute the stored procedure
    '
    ' Requires setting up MSSQL Default servers from the Maintenance tab
    '
    'Declare the connection string based on the configuration variables
   
Dim conString As New String(_MYSQL)
      
    ' Set connection string based on the company defined at the destination
    ' to match the company connection string
    '
    'If _COMPANY = " TWO" Then
    '           conString = _SQLDEF_TWO
    'Else
    '           conString = _SQLDEF_OTHERCOMPANY
    'End If
    '*******************************************************************
  
    'Create the SQL connection and open it
    Dim myConn As System.Data.SqlClient.SqlConnection = NewSystem.Data.SqlClient.SqlConnection(conString)
    myConn.Open()
    'Define the query command to be run
    Dim sqlCode As String = "paCreateMissingBudgetPeriodics"
    'Declare the SQL command as the query string
    Dim myCmd AsSystem.Data.SqlClient.SqlCommand = NewSystem.Data.SqlClient.SqlCommand(sqlCode, myConn)
    myCmd.CommandType = System.Data.CommandType.StoredProcedure
    '-------------------------------------------------------------------------------
    ' Add SQL Stored Procedure parameters here
    ' myCmd.Parameters.AddWithValue("@ParameterName", _ParameterValue)
    '-------------------------------------------------------------------------------
    'Define the SQL Reader and execute it
    Dim sqlReader AsSystem.Data.SqlClient.SqlDataReader = myCmd.ExecuteReader()
    Dim result as string
    Try
       
        'Read the line
        ifsqlReader.HasRows then
              while sqlReader.Read()
                     result = sqlReader.GetValue(0)
                     ' Add Logic as needed
              end while
        end if
        Return result
    Catch ex As Exception
              If (mapInterface = 1) Then
                     System.Windows.Forms.MessageBox.Show(ex.ToString())
              End If
              Return String.Empty
      
    Finally
              sqlReader.Close()
              myConn.Close()
    End Try
Catch ex As Exception
       If (mapInterface = 1) Then
              System.Windows.Forms.MessageBox.Show(ex.ToString())
       End If
       Return String.Empty
End Try
Now, you can modify the script as needed but remember, I can use this template as my starting point for any .NET process I need to create.

Hopefully this has provided a starting point for how to use the Script Templates in SmartConnect.
Happy Integrating,
Lorren

Want more in depth knowledge of SmartConnect? Feel free to reach out to Lorren or our sales team at lorren.zemke@eonesolutions.com or sales@eonesolutions.com for more training information!

Thursday, November 14, 2013

Video Interview on a Smart Way to Connect Dynamics CRM with Dynamics GP




Last week at the eXtreme CRM partner event, our very own Abbey Cooper had the opportunity to share, on the CRM Software Blog, about using SmartConnect for integrations with Microsoft Dynamics CRM, GP, Salesforce and more. She mentions a few customer stories, sharing how they used SmartConnect for their GP and CRM integrations. One story includes how a Scribe customer loved SmartConnect so much that they replaced their Scribe software with SmartConnect, resulting in a huge amount of money saved. 

So take a minute to check out the video. You can find the full blog post from the CRM Software Blog here.

Want more information on SmartConnect? Please email us at sales@eonesolutions.com for more information!

Tuesday, November 12, 2013

Tech Tuesday: How to Add an Extender View to a SmartList

This week's Tech Tuesday article is from our very own support guru, David Youngquist! Dave knows everything there is to know about our software solutions and shares how to add an Extender view to a SmartList.

There are several ways to add Extender data to a SmartList using SmartList Builder, but one method that is often overlooked is creating an Extender view and linking that view using Smartlist Builder. 

Here are the simple steps for adding Extender data to a Smartlist. 

Login to Great Plains as the sa user (only the sa user will have Views as an option)

1.       Click on Views, then click New.
2.       In the Extender View window, give the view a name, and then click the add button. 


3.       Pick “Extender Window” as the type, and pick the Extender window you need to add to the SmartList.

4.       Check off the fields you want to appear in the view.  I would recommend marking all. 
 
 
5.       Click Save on the View. 

6.       Now to go Tools – SmartList Builder – Security – SQL Table Security. 

7.       Checkmark the database you created the view in, and change the type to “Views”.  Place a checkmark in the view that you just created. 
 
 

8.       Hit the OK button to save the security.  

9.       Open up SmartList Builder and open the SmartList you need to add the Extender data to. 

10.    Click on the + button to add a table.  Pick SQL Server Table


11.       Change the list to show “Views”, select your view, and then add it to the SmartList.  Make sure you use a left outer join if you have data in the main table, but there may not be data in the Extender table.  Pick the appropriate key field from the list to link the Extender view to the main table. 

12.       You now will have a SmartList that will display Extender data on it.  
 
 Interested in a demo of Extender or SmartList Builder? Feel free to email sales@eonesolutions.com for more information!