Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Problem in fetching records through advanced find

Posted on by 340

Hi  ,

I want to Fetch Opportunity related to Appointments have End date not greater than today's date .

I created Advanced find query for Opportunity related to Appointments havind End time last X Years = 100
but it Fetch records having end time less than todays date but also there are some opportunity records as below


Opportunity record having 2 Appointments :
1. Appointment A = End date 30/10/2017
2. Appointment B = End Date 1/8/2017 (dd/mm/yyyy)

This records is also fetched in query and I don't want to fetch such Opportunity records .

*This post is locked for comments

  • Somesh2207 Profile Picture
    Somesh2207 1,563 on at
    RE: Problem in fetching records through advanced find

    Hi David, based on the question I think, that is what is required. Amiy can confirm.

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Problem in fetching records through advanced find

    Also note that queries structured like the 2 examples above will return any opportunities where there is at least one appointment that matches the criteria. So, if an opportunity has 2 appointments, one with an end date before today, and the other with an end date after today, then this opportunity will be in the results

  • Somesh2207 Profile Picture
    Somesh2207 1,563 on at
    RE: Problem in fetching records through advanced find

    Hi Amiy,

    with your query, it will consider all the end times in the current year as well, so it will show you future data belonging to this year.

    This below approach can solve your issue. Please try this and let me know if it is working:

    End Time Older than 1 minute - Should filter out all data whose end time is current time and in future.

    Pic892017_5F00_2.png

  • Priyesh Profile Picture
    Priyesh 7,392 User Group Leader on at
    RE: Problem in fetching records through advanced find

    Hi,

    Can you try this example from my screenshot below and check your results?

    opp_5F00_ap.PNG

    Please mark my answer as verified if this helped you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans