SQL request Quick Find

This question has suggested answer(s)

Hi every body,

it is possible to change the SQL Request used in quick find research for Person.

I would like to add and Pers_status = 'Active'

Do you think it's possible.

Thanks,

Regards,
Philippe

Philippe LIMA,

www.ateja.fr

All Replies
  • UP

    Philippe LIMA,

    www.ateja.fr

  • I don't think so.

    Unless I'm wrong and someone would like to correct me, the SQL queries that the Apache Solr service uses are defined within the Solr core instance.  If you want to have a look then you will find a file called data-config.xml in your..\CRM\Services\QuickFind\instance\conf folder. But you probably don't want to be changing it as (a) who knows what kind of side effects this might have, and (b) I'm pretty sure that this file gets redeployed by the service under certain circumstances, so you would constantly lose any changes that had been made.

  • Hello,

    Quick Find is a great function but we would be able to filter the results.

    In all our CRM installations, users never delete the contacts. They set them to inactive.

    With Quick Find, you need to open the record to check if the person is active or not.

    I don't know which views are used for quickfind.

    If it is not vsearchlistperson, perhaps we could adapt the view used for searching person within Quickfind  without impacting the standard search where we can add filters.

    Unfortunately, I don't see changes in scrm 2018R1.

    Any solution for this?

    A similar problem exists on the Outlook/Exchange plugins.

    Emails are automatically found based on the email, but without considering the person status. The filter should be available in order to void saving emails to inactive persons.

    Any ideas?

  • Jerome

    These are great suggestions.

    I will forward to our Product Management team.


  • Not a solution, but a way to work around the problem.

    1. Create a custom text field on the Person Table.

    2. Stop IIS

    3. Update the Field to Show

        (A) - First Name Last Name for Active people

        (I) - First Name Last Name for Inctive people

    UPDATE Person SET [Pers_CustomField] = (Select '(A)'+ ' - ' + Pers_FirstName + ' ' + Pers_LastName) WHERE Pers_Status = 'Active'

    UPDATE Person SET [Pers_CustomField] = (Select '(I)'+ ' - ' + Pers_FirstName + ' ' + Pers_LastName) WHERE Pers_Status = 'Inactive'

    4. Create a trigger that will do this on insert or update.

    5. Update the Metadata Tables

    UPDATE Custom_Tables SET Bord_RecDescriptor = '#Pers_CustomField#', Bord_UpdatedDate = GETDATE() WHERE Bord_Caption = 'Person';

    UPDATE Custom_Sysparams SET Parm_Value = NULL WHERE Parm_Name = 'SolrLastIndexScan'

    6. Delete the QuickFind folder from \CRM\<instance name>

    7. Start IIS

    Cheers!

    Tomas Blomqvist
    CRM Technical Consultant 
    BAASS Business Solutions