Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
New Member
Posts: 5
Registered: ‎05-07-2012
Accepted Solution

Issue with contact merge in SLX Lan client 7.5.2.2151

hello,

 

when performing a contact merge, records in the AccountProduct table are not updated with the "primary" contactID from the merge operation.  I have a couple of questions regarding this.

 

1.  Is the SLX merge capabilities updateable or is this built in SLX code?

2.  If the answer to number 1 is yes, how do I find this code?

3.  If the answer is no, are there any workarounds?

 

thanks for you help!!!

Dan

Gold Super Contributor
Posts: 3,087
Registered: ‎03-19-2009

Re: Issue with contact merge in SLX Lan client 7.5.2.2151

To answer:

 1 - "Mereg" is not customizable - it is what we call  "hard code" in the Saleslogix exe/dll's and teh source is NOT available to anyone - not even BP's.. never has been.

 

2 - Of course... see 1 above ;-)

 

3 - You could build your own merge from scratch.. OR just build out a custom "tool" that you run "post merge" to fix up the loose ends.

--
RJ Ledger - rjledger@rjlSystems.net +1 603.369.3047 x101

".. Innovators in Mobility - Experts in Workflow Automation..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
New Member
Posts: 5
Registered: ‎05-07-2012

Re: Issue with contact merge in SLX Lan client 7.5.2.2151

hi RJLedger,

 

Thanks for the helpful response!!

 

What about "capturing" the contact merge event, perform merge operations that the built in merge is missing, then pass control back over to the buil in merge.  

 

Does this sound doable?  

Is there an easier approach?

 

thanks!

Dan

Highlighted
Gold Super Contributor
Posts: 3,087
Registered: ‎03-19-2009

Re: Issue with contact merge in SLX Lan client 7.5.2.2151

Hi Dan,

    Just to make sure I gave you a correct response.. I just took a quick look at the Global (event handler) VBScripts to see if you can catch the event() needed to do this.. and the quick answer is ... maybe you can create a custom "OnBeforeFunctionExecute_....function name..." and an OnAfterFunctionExecute_...function name.." to trap it... maybe.. but you need to do a bit of experimenting of course.

--
RJ Ledger - rjledger@rjlSystems.net +1 603.369.3047 x101

".. Innovators in Mobility - Experts in Workflow Automation..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
New Member
Posts: 5
Registered: ‎05-07-2012

Re: Issue with contact merge in SLX Lan client 7.5.2.2151

thanks RJLedger!

 

I will try it out!!

 

Dan

Tuned Listener
Posts: 12
Registered: ‎03-19-2009

Re: Issue with contact merge in SLX Lan client 7.5.2.2151

I discovered this issue recently and opened a ticket with Sage support.  I agree with RJLedger - you can trap the Merge Records function before and after it executes and examine the IDs affected; from there you can fix related records. 

 

Here is my resolution if you're still struggling with this:

 

- see http://customerfx.com/pages/saleslogix-answers/2011/06/09/Adding-Custom-Code-to-the-Merge-Records-Fu... - this post tells how to create a vbScript that runs in place of the Merge Records function.  You can then 

use this code to locate the record IDs being passed to MergeRecords. 

 

 

    dim idList , x

 

    ' This generates a list of IDs that were sent into the merge.

 

    for x = 0 to application.MainViews.ActiveView.GroupsPane.Selection.Count - 1

        idList = idList & application.MainViews.ActiveView.GroupsPane.Selection.Item(x) & ","

    next

    msgbox idlist

 


    Application.Basicfunctions.DoInvoke "Function","MainViewSmiley Very HappyupMerge"

 

 

Note that you can run code after the DoInvoke as well - control returns here after the merge completes.

 

 

What I also learned is that the Check for Duplicates and Purge Records tools can also cause the same issue, but since they operate on large numbers of records, there's no way to figure out what actions they took. 

 

Has anyone written a replacement Check for Duplicates as an Active Form or Script?  That looks like the only way to really resolve this issue.

New Member
Posts: 5
Registered: ‎05-07-2012

Re: Issue with contact merge in SLX Lan client 7.5.2.2151

hi DaleWarner,

 

thanks a lot for your post!  It was the missing piece of the puzzle for me!

 

Below is exactly what I did.

 

1.  Create a VBScript file with a Sub Main function.  the file is called C_ContactMergeHelper stored in System.

2.  Open System->Contact Details form, click on GroupsPane and then select view->properties-PopupMenu and select Merge Records option.  Change Action to ActiveScript and Argument to System:C_ContactMergeHelper

3.  Contents of C_ContactMergeHelper:

 

Sub Main()

for x = 0 to application.MainViews.ActiveView.GroupsPane.Selection.Count - 1
       redim preserve contactIDs(x + 1)
       redim preserve contactNames(x + 1)
       contactIDs(x) = application.MainViews.ActiveView.GroupsPane.Selection.Item(x)
       contactNames(x) = GetContactName(contactIDs(x))
next

Application.Basicfunctions.DoInvoke "Function","MainView:DupMerge"


sqlCondition = "CONTACTID in ("
   For Each contactID In contactIDs
      if contactID <> "" then
         sqlCondition = sqlCondition & "'" & contactID & "',"
      end if
   Next

   sqlCondition = Left(sqlCondition,len(sqlCondition) - 1) & ")"

   contactIDCountPostMerge = GetField("COUNT(CONTACTID)",  "CONTACT", sqlCondition)

   'if the Merge was not canceled and it was successful, there should only be one
   'contactID (primary) still in existance in the Contact table
   if(contactIDCountPostMerge = 1) then

           primaryContactID = GetField("CONTACTID", "CONTACT", sqlCondition)

           accountID = GetField("ACCOUNTID", "CONTACT", "CONTACTID = '" & primaryContactID & "'")

           x = 0
           For Each contactID In contactIDs
              if contactID <> "" and contactID <> primaryContactID then

                   'do what you need to here
              end if
              x = x + 1
           Next
   end if

 

thanks

Dan

 


Tuned Listener
Posts: 12
Registered: ‎03-19-2009

Re: Issue with contact merge in SLX Lan client 7.5.2.2151

Glad it was of value to you.

 

Now if you figure out what to do with Tools / Maintenance / Check for Duplicates ... let me know!