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 :

Using RetrieveMultipleRequest in Microsoft Dynamics CRM 2011 in VB .NET

Jamie Miley Profile Picture Jamie Miley 2,060
RetrieveMultiple is probably the most common request I use so I figured I better add a decent VB.NET example to my example index. This illustration shows how to use the RetrieveMultipleRequest in Microsoft Dynamics CRM 2011 with VB.NET

Ok, here is what the code looks like!

In VB.NET

 Dim rmr As New RetrieveMultipleRequest()
 Dim resp As New RetrieveMultipleResponse()

 Dim qry As New QueryExpression()
 qry.EntityName = "systemuser"
 qry.ColumnSet = New ColumnSet(True)
 qry.Criteria = New FilterExpression()
 qry.Criteria.FilterOperator = LogicalOperator.And

 Dim cnd As New ConditionExpression()
 cnd.AttributeName = "organizationid"
 cnd.Operator = ConditionOperator.Equal
 cnd.Values.Add("f5d3e6d4-61b5-4739-af1b-a8ca3232a4e3")
 qry.Criteria.Conditions.Add(cnd)

 rmr.Query = qry
 resp = DirectCast(slos.Execute(rmr), RetrieveMultipleResponse)


Thats all there is to it!
-



This was originally posted here.

Comments

*This post is locked for comments