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
to set the value of an entity into in a field in another entity, how coud i do it ?
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));
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 ?
Hi ,
Please check below reference -
missdynamicscrm.blogspot.com/.../intercept-columnfield-value-in-crm-view-retrievemultipleplugin.html
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);
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6