全て
| カテゴリ未分類
| 通常
| 数学
| 投資
| 副業
| 転職・就職
| ブログ
| 株Stock
| VBA
| SharePoint
| REST API
| RenderListDataAsStream
| PowerAutomateDesktop
| Graph API
| PowerApps
| PowerAutomate
| PowerFx
| OfficeScriptオフィススクリプト
| PowerAutomate日時Excel日時相互関係
| PowerShell
| Dataverse
| UiPath
| OneDrive
| LINQ
| VB.NET
| C#.NET
| WPFC#.NET
| Git
カテゴリ:VB.NET
Imports Microsoft.Xrm.Tooling.Connector Imports Microsoft.PowerPlatform.Cds.Client Imports Microsoft.PowerPlatform.Cds.Client.Query Module Module1 Sub Main() Dim connectionString As String = "AuthType=OAuth;Username=yourusername@yourtenant.onmicrosoft.com;Password=yourpassword;Url=https://yourorg.crm.dynamics.com;AppId=51f81489-12ee-4a9e-aaae-a2591f45987d;RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;LoginPrompt=Auto" ' Create a new instance of the CrmServiceClient Dim svc As New CdsServiceClient(connectionString) ' Check if the connection is successful If svc.IsReady Then Console.WriteLine("Connection successful") ' Define query expression Dim query As New QueryExpression("account") query.ColumnSet.AddColumns("name", "address1_city", "address1_country") ' Execute the query Dim entities As EntityCollection = svc.RetrieveMultiple(query) ' Display retrieved data For Each entity As Entity In entities.Entities Console.WriteLine($"Name: {entity.GetAttributeValue(Of String)("name")}, City: {entity.GetAttributeValue(Of String)("address1_city")}, Country: {entity.GetAttributeValue(Of String)("address1_country")}") Next Else Console.WriteLine("Connection failed") End If ' Close the connection svc.Dispose() Console.ReadLine() End Sub End Module お気に入りの記事を「いいね!」で応援しよう
Last updated
2024.02.22 06:22:59
[VB.NET] カテゴリの最新記事
|