Welcome to Outlook2CRM Sign in | How to Register?
  The Official Outlook2CRM Development blog. Hosted by Ryan Farley, Director of Development for Customer FX Corporation and developer of Outlook2CRM.

 Using Outlook2CRM to Match Outlook E-mail On Multiple E-mail Fields


SalesLogix uses the CONTACT.EMAIL field for storing the contact's primary e-mail address. This is what Outlook2CRM uses to match an e-mail with a contact in SalesLogix. However, SalesLogix does have two other e-mail fields for a contact. These fields are not used by many, and it it likely that most users don't even know about these two other fields. The fields are CONTACT.SECONDARYEMAIL and CONTACT.EMAIL3.

For those that do use these additional e-mail fields in SalesLogix, a quick customization can make Outlook2CRM utilize these fields when matching. This solution was provided by an Outlook2CRM beta tester, Antonio GarcĂ­a from LagaSoft in Berlin, Germany. The solution is outlined as follows:

  1. For the button in question, set the AutoContactMatch property to False (this will cause Outlook2CRM to avoid attempting to match)
  2. Customize the Contact Match Dialog as needed in Architect (Outlook2CRM:Outlook2CRM Dialog - Select contact match)
  3. Modify the VBScript plugin in Architect titled "Outlook2CRM:Outlook2CRM Event - Create Contact" to replace with the following code:
'Including Script - Outlook2CRM:Outlook2CRM Addin Client API

Sub Main
    Dim objBASIC
    Dim slxContactID

    Set objBASIC = Application.BasicFunctions
    
    slxContactID = Addin_Ex_ContactID

    If slxContactID <> "" Then
       objBASIC.ShowDetails "contact", slxContactID
    Else
       objBASIC.DoInvoke "Form", "Outlook2CRM:Outlook2CRM Dialog - Select contact match"
    End If

    If (Addin_AttachmentCount > 0) And (Addin_IncludeAttachedFiles) Then
        objBASIC.DoInvoke "Form", "Outlook2CRM:Outlook2CRM Dialog - Add Attachments"
    End If

    Set objBASIC = Nothing
End Sub

Function Addin_Ex_ContactID 
    Dim sSQL
    Dim objRS

    sSQL = "SELECT CONTACTID FROM CONTACT WHERE EMAIL = '"
    sSQL = sSQL & Addin_FromAddress & "' OR SECONDARYEMAIL = '"
    sSQL = sSQL & Addin_FromAddress & "' OR EMAIL3 = '" & Addin_FromAddress & "'"

    Set objRS = Application.GetNewConnection.Execute(sSQL)

    If Not objRS.EOF Then
        Addin_Ex_ContactID  = objRS.Fields("CONTACTID").Value & ""
    End If

    objRS.Close
    Set objRS    = Nothing
End Function

Thanks to an active beta tester for this great Outlook2CRM solution! Use at your own risk.


Published Tuesday, May 15, 2007 12:09 PM by Ryan Farley

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Brian Segers said:

Is there any plans to add this to the Std. Code for Outlook2CRM?

Please... Please...Please

January 4, 2008 4:27 PM
 

Ryan Farley said:

Hi Brian,

Yes, we will be adding this to a future version of Outlook2CRM. We will be releasing v1.2 very soon, so it problably won't make it in that version, but it will definitely be in the next.

-Ryan

January 4, 2008 6:05 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit