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)

Retrieve Mutiple

(0) ShareShare
ReportReport
Posted on by 250

Hello Everyone.

How can I do a retrieve multiple in C#, i need a plugin for when i create a register it ill autofill one of the form fields.

Can anyone help me ?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    T.I.A Profile Picture
    1,760 on at

    You can use a FetchExpression:

    Service.RetrieveMultiple(new FetchExpression(your fetch xml query method goes here));

    Or you can use a QueryExpression:

    QueryExpression query = new QueryExpression("your entity");

                               query.ColumnSet.AddColumn("field to return");

                               query.Criteria.AddCondition("statuscode", ConditionOperator.Equal, 1);

                               EntityCollection example = Service.RetrieveMultiple(query);

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi ,

    Please check below reference  -

    missdynamicscrm.blogspot.com/.../intercept-columnfield-value-in-crm-view-retrievemultipleplugin.html

  • TaniSantos Profile Picture
    250 on at

    In this line " query.Criteria.AddCondition("statuscode", ConditionOperator.Equal, 1);" where is written statuscode i ll put a field that i want to use as parameter ?

  • Suggested answer
    Anas Rafik Profile Picture
    365 on at

    use this

    string myFetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
    	              "<entity name='opportunityproduct'>" +
    "<attribute name='opportunityproductid' />" + "<filter type='and'>" + "<condition attribute='opportunityid' operator='eq' uitype='opportunity' value='"+id+"' />" + "</filter>" + "</entity>" + "</fetch>"; EntityCollection fetchxmlResult = service.RetrieveMultiple(new FetchExpression(myFetchXml));


  • TaniSantos Profile Picture
    250 on at

    to set the value of an entity into in a field in another entity,  how coud i do it ?

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans