Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open Microsoft.Xrm.Sdk.Client
- open Microsoft.Xrm.Sdk.Query
- open System
- open System.IdentityModel
- open System.ServiceModel.Description
- let clientCredentials = new ClientCredentials();
- clientCredentials.UserName.UserName <- "admin@rino20168.onmicrosoft.com"
- clientCredentials.UserName.Password <- "RinoErBest123"
- let url = "https://rino20168.api.crm4.dynamics.com/XrmServices/2011/Organization.svc"
- let serviceProxy = new OrganizationServiceProxy(new Uri(url), null, clientCredentials, null)
- let qe = new QueryExpression("opportunity")
- qe.ColumnSet <- new ColumnSet(true)
- let entities = serviceProxy.RetrieveMultiple(qe).Entities
- printfn "%i" entities.Count
- let test =
- entities
- |> Seq.map(fun x -> x.GetAttributeValue<string>("name"))
- |> Seq.toList
- //|> Seq.head
- printfn "%A" test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement