locked
Leads without history RRS feed

  • Question

  • Hello - I am trying to weed out old data from our system and am looking for a way to find leads that do not have any history. I can do this either in the front end or back end, and have an outside too (Rapid Insight's Veera) to help merge the information. I can't seem to find where the history is stored. Is it the activities table or is there a better way to do this?
    Monday, June 20, 2011 4:13 PM

All replies

  • So the way to do this is to use the Marketing List 'trick'.

    1. Add all the active leads to a Marketing List.

    2. Then in Manage Members select, Use Advanced Find to Remove Members.

    3. Now create a View filter that finds all the leads with a history record, remove all those leads.

    4. You are left with all the leads that don't have any history. Then you can weed out from there.


    Jerry CRM Innovation - Need a solution for CRM to help you manage Events or Email Marketing? Follow me on Twitter
    Tuesday, June 21, 2011 6:27 PM
  • Try using the following query to indentify the leads that does not have activities:

    SELECT * FROM Lead
    WHERE LeadId NOT IN( 

     SELECT PartyId FROM ActivityPartyBase
     WHERE PartyObjectTypeCode = 4
     AND IsPartyDeleted = 0
        
     UNION
     
     SELECT RegardingObjectId FROM ActivityPointerBase
     WHERE RegardingObjectTypeCode = 4 )

    I believe this solves your problem.


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Tuesday, June 21, 2011 6:42 PM