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)

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

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