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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

retrieving records using plugin

(0) ShareShare
ReportReport
Posted on by

Hi i have to fetch 25000 records. As of my knowledge i can retrieve by query expression but can i retrieve the records by using plugin ???

If so can any one please attach the code.

Regards,

Sai Krishna P

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Sai Krishna,

    Please try the code below.

    // Create a column set to define which attributes should be retrieved.
    
    ColumnSet attributes = new ColumnSet(new string[] { "name", "ownerid" });
     
    
    // Retrieve the account and its name and ownerid attributes.
    
    account = service.Retrieve(account.LogicalName, _accountId, attributes);
    
    Console.Write("retrieved, ");

    For more details, refer the link below.

    service is the IOrganisation Service which is made from IServiceProvider serviceprovider.

    IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
    
    IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
    
    IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

    http://davecorun.com/blog/2012/01/05/crm-2011retrieve-plugin/

    Hope this helps.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans