Tags

CRM & Technology Management


Sales and Marketing Advisor


Sign Up For the Newsletter

Login

Welcome to the Technology Advisors Blog!!

Technology Advisors CRM and Technical Information
Aug 17
2011

Soothing Ointment for a Minor Irritation

Posted by: Greg Andorka in MyBlog

Tagged in: Tips & Tricks

Greg Andorka

Sometimes all you need is a small change to convert an irritated customer. This was the case recently when one of our clients submitted a ticket about the "Check for Duplicates" button on the Insert Contact/Account screen.

It seems that even though they filled out fields on the form and pressed the "Check for Duplicates" button, the screen is displayed but no duplicates are found. I guess the argument could be made that this is a training issue, because all you need to do is check the fields you're interested in searching on and press the button again. Therein lies the source of the irritation. The client felt that filling out the form and pressing "Check for Duplicates" should do the trick.

A little sleuthing on our part resulted in a simple change involving two lines of code, also known as 'the ointment.'

Where and how to apply the ointment:

The change is applied to the code file ContactCheckForDuplicates.ascs.cs in the Sage SalesLogix portal. At first it would seem that all you need to do is check all the boxes and you're good to go, but alas, the form doesn't search when it is first opened anyway. This issue is easily solved by adding a line to the OnPreRender method as shown in the code snippet below.

    protected override void OnPreRender(EventArgs e)
    {
        try
        {
            if (Visible && DuplicateProvider != null)
            {
                LoadMatchFilters();
                LoadSourceEntity();
                Mode.Value = "Load";
                LoadPotentialMatches();
            }
        }
        catch (Exception exp)
        {
            throw new ApplicationException(GetLocalResourceObject("LoadErrorMSG").ToString());
        }
    }

The bolded line is a setting that is used by the next line "LoadPotentialMatches()" to perform the search.

Next we have to check all the check boxes to give it something to search on. This is done with a change to the "LoadMatchFilters()" method as shown in the snippet below.

            item.Value = propertyFilter.PropertyName;
            //item.Selected = propertyFilter.Enabled;
            item.Selected = true;
            chklstFilters.Items.Add(item);

Again, the bolded line is the change to make. Be sure to comment out the line above it. 

Now granted this is not an elegant hack, but our goal is to minimize costs and apply a little soothing ointment to a minor irritation.

Hits: 4806
Comments (0)Add Comment

Write comment
smaller | bigger

security code
Write the displayed characters


busy