Skip to main content

Notifications

Customer Service forum

Fetch XML Top 1 for each account

Posted on by Microsoft Employee

Hi

We are trying to customize CRM for a first come, first serve basis.

We are planning to customize a view and use the View Designer available with XRM Toolkit for creating a custom filter.

We would like to return the top record for each account and display in the view.

We are planning to only show the last application for each account in the view.

Our XML would be formatted as follows - I just need to determine how to pass the value for each account.

<fetch top="1" version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="new_application">
    <attribute name="new_applicationid" />
    <attribute name="new_applicationname" />
    <attribute name="createdon" />
    <order attribute="new_applicationname" descending="false" />
    <filter type="and">
      <condition attribute="new_accountid" operator="eq" />
    </filter>
  </entity>
</fetch>

I would really appreciate any assistance.

Thanks

Regards

Tony


Categories:
  • RE: Fetch XML Top 1 for each account

    North52 Quick Tile functionality would allow this (note commercial solution) - you could create a tile which showed the last application on the account form, the use can see summary details in the tile and click through - see the Next Opportunity tile in the image below (note you can have 1 or more tiles, it's not fixed to six like the example below:

    Find out more here: https://www.north52.com/apps/quick-tile/

    Cheers,

    Bruce

  • Suggested answer
    Nick.Doelman Profile Picture
    Nick.Doelman 1,947 Most Valuable Professional on at
    RE: Fetch XML Top 1 for each account

    First off, its "XrmToolBox".  I know what you mean (the free tool that is just awesome) but there is a "Xrm Toolkit" which is a paid add-on for Visual Studio.  Glad we got that cleared up. :)

    Once approach that is a bit different is to write a SSRS report, you would a lot more flexibility in creating a "view" and use the FetchXML parameters.  You could display exactly what you are looking for.  You would also be able to create a "drill down" that would allow users to drill back to the D365 record.

    You could surface the report on a dashboard via an IFrame.  The downside is that you would need to figure out how to write an SSRS report (its not that hard... but some investment in learning would need to happen), the other downside is that it may take a few seconds to render.

    Just a thought.

    Cheers

    Nick

  • Mahendar Pal Profile Picture
    Mahendar Pal 45,041 on at
    RE: Fetch XML Top 1 for each account

    Hi,

    One possible option could be to use custom filter for view is to have a plugin and change view output based on your custom filter, if possible you can query your account based on some fields.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Fetch XML Top 1 for each account

    Hi,

    I am afraid this may not be possible in a view.

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

News and Announcements

Give Back to the Community this Month

Quick Links

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,807 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,135 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans