locked
Is there a NOT in Advanced Find? RRS feed

  • Question

  • Is there any way to use a NOT in Advanced Find? I can See OR and AND but I can't see any way to exclude records based on meeting a condition.

    - Mark

    Thursday, November 10, 2011 10:22 PM

Answers

  • I am afraid not. Your only option is to create a custom SSRS report.

    Here is what microsoft is doing for their neglected leads report.

    Select fl.owneridname,fl.ownerid,Count(*) as count

    From

    (' + @CRM_FilteredLead + ') AS fl

    Where not Exists ( select fl.leadid from FilteredActivityPointer fa

    Where fa.regardingobjectid = fl.leadid

    and fa.modifiedonutc > dateadd(d, -'+ CONVERT(nVarChar(20), @NeglectedDays)+',GetUTCDate())

    Union

    select fl.leadid from FilteredAnnotation fn

    where fn.objectid = fl.leadid

    and fn.modifiedonutc > dateadd(d, -'+ CONVERT(nVarChar(20), @NeglectedDays)+',GetUTCDate())

    )

    and fl.modifiedonutc < dateadd(d, -'+ CONVERT(nVarChar(20), @NeglectedDays)+',GetUTCDate())

    and fl.statecode = 0

    Group By

    fl.ownerid,fl.owneridname

    I hope this helps.


    -------------------------------------------------------------------------------- If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com
    • Proposed as answer by Amreek Singh Thursday, November 10, 2011 10:50 PM
    • Marked as answer by Psychopasta Friday, November 11, 2011 3:38 PM
    Thursday, November 10, 2011 10:50 PM