web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Bind FetchXml Data to Asp Grid View

(0) ShareShare
ReportReport
Posted on by 7,042

Hi Guys,

I have some requirements.

Currently im working on Customer Portal Development (MS CRM 2015)

Customer wants to see what are products they purchased previously. Here i need to fetch the data based on the Accounts (here accounts entity holds the customer details, i failed to retrieve data using LinQ because i can't able to extract the data based on the Account because it is lookup). So i wanna try in fetchxml

Here is my question how can i extract the data based on Accounts and if i try using fetchxml how to bind those data to grid view in ASP.Net

Help me to get out of this

Thanks in advance!!!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    You can use CrmDataSource with fetchxml

    msdn.microsoft.com/.../gg695802.aspx

    Thanks

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Assuming you need to dynamically set the query (rather than use a datasource) you can do a standard RetrieveMultiple passing a FetchExpression and set the results.Entities as the DataSource on the grid since the the collection supports the IList interface.

  • Suggested answer
    Sayhaitokumar Profile Picture
    7,042 on at

    Hi,

    I cannot able to apply filter.

    For example i write xml for cases raised by a customer (i hard code the customer name) but filter is not  applying

    here is my code

    <FetchXml>

                                       <fetch>

                                           <entity name="incident" />

                                           <attribute name="title" />

                                           <filter type="and">

                                               <condition attribute="title" operator="eq" value="Test Case (Customer Portal)" />

                                           </filter>

                                       </fetch>

                                   </FetchXml>

  • Verified answer
    Sayhaitokumar Profile Picture
    7,042 on at

    Hi Guys,

    I did this using FetchXml and successfully bind the data into the GridView

    For more info follow the below blog

    365dynamicscrm.wordpress.com/.../converting-fetchxml-to-querystring-and-binding-into-grid-view-in-asp-net-in-dynamics-crm-customer-portal

    Thanks for the help

  • Verified answer
    Sayhaitokumar Profile Picture
    7,042 on at

    Hi Scott and HIMBAP,

    Thanks for the help

    Scott,

    Your hint helped me to finish the task

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans