Skip to content

Commit 71c7d40

Browse files
authored
Live publish
2 parents a9fab39 + dd2fb1a commit 71c7d40

File tree

8 files changed

+79
-114
lines changed

8 files changed

+79
-114
lines changed
Loading
Loading
Loading

powerapps-docs/developer/data-platform/org-service/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
href: overview.md
55
- name: Get started
66
items:
7-
- name: 'Quickstart: Create a console app'
7+
- name: 'Quickstart: Execute service request'
88
href: quick-start-org-service-console-app.md
99
- name: Late and Early-bound programming
1010
href: early-bound-programming.md

powerapps-docs/developer/data-platform/org-service/iorganizationservice-interface.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "IOrganizationService Interface (Microsoft Dataverse) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3-
description: "Learn about the common methods exposed to perform data operations with Microsoft Dataverse." # 115-145 characters including spaces. This abstract displays in the search result.
3+
description: "Learn about the common web service methods exposed to perform data operations in Microsoft Dataverse." # 115-145 characters including spaces. This abstract displays in the search result.
44
ms.custom: intro-internal
5-
ms.date: 03/22/2022
5+
ms.date: 09/30/2022
66
ms.reviewer: "pehecke"
77
ms.topic: "article"
88
author: "divka78" # GitHub ID
@@ -14,32 +14,28 @@ search.app:
1414
- PowerApps
1515
- D365CE
1616
contributors:
17-
- PHecke
17+
- phecke
1818
- JimDaly
1919
---
2020

2121
# IOrganizationService Interface
2222

2323
[!INCLUDE[cc-terminology](../includes/cc-terminology.md)]
2424

25-
The <xref:Microsoft.Xrm.Sdk.IOrganizationService> interface provides a set of methods used to perform the most common operations on system and custom tables and on the table definitions for your organization.
25+
The <xref:Microsoft.Xrm.Sdk.IOrganizationService> interface exposes methods used to perform web service operations on system and custom tables and on the table definitions (metadata) for your environment.
2626

2727
## Client applications
2828

29-
This interface is implemented in a number of classes that you can use in your code when creating client applications.
29+
This interface is implemented by a couple of classes that you can use in your code when creating client applications.
3030

3131
|Class|Description|
3232
|--|--|
33-
|<xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy>|This is the original low-level class which is used by WCF and the Organization service endpoint |
34-
|<xref:Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient>|This low-level class was created to enable OAuth authentication to the Organization service endpoint|
35-
|<xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient>|This is the class you should use when creating .NET client applications. |
36-
37-
> [!NOTE]
38-
> You may find older code or samples using the low-level <xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy> or <xref:Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient> classes, but we recommend you use <xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient> for new .NET Client applications
33+
|<xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient>|This is the class you should use when creating .NET Framework client applications. |
34+
|<xref:Microsoft.PowerPlatform.Dataverse.Client.ServiceClient>|This is the class you should use when creating .NET Framework or .NET Core client applications. |
3935

4036
## Plug-ins
4137

42-
When you write plug-ins, there is also an object returned from the <xref:Microsoft.Xrm.Sdk.IOrganizationServiceFactory>.<xref:Microsoft.Xrm.Sdk.IOrganizationServiceFactory.CreateOrganizationService(System.Nullable{System.Guid})> which implements the <xref:Microsoft.Xrm.Sdk.IOrganizationService> interface but is not any of the types in the classes above.
38+
When you write plug-ins, there is also an object returned from the <xref:Microsoft.Xrm.Sdk.IOrganizationServiceFactory>.<xref:Microsoft.Xrm.Sdk.IOrganizationServiceFactory.CreateOrganizationService(System.Nullable{System.Guid})> which implements the <xref:Microsoft.Xrm.Sdk.IOrganizationService> interface but is not any of the types in the service client classes above.
4339

4440
## IOrganizationService Methods
4541

Lines changed: 65 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: "Quickstart: Organization service sample (C#) (Microsoft Dataverse) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3-
description: "This quickstart will show you how to connect to the organization service of the Microsoft Dataverse" # 115-145 characters including spaces. This abstract displays in the search result.
4-
ms.date: 04/03/2022
5-
author: JimDaly
6-
ms.author: jdaly
2+
title: "Quickstart: Execute an Organization service request (C#) (Microsoft Dataverse) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3+
description: "Demonstrates how to connect to the Organization service of Microsoft Dataverse and execute a request." # 115-145 characters including spaces. This abstract displays in the search result.
4+
ms.date: 10/05/2022
5+
author: phecke
6+
ms.author: pehecke
77
manager: kvivek
8-
ms.reviewer: pehecke
8+
ms.reviewer: jdaly
99
ms.topic: "article"
1010
search.audienceType:
1111
- developer
@@ -16,129 +16,122 @@ contributors:
1616
- JimDaly
1717
- phecke
1818
---
19-
# Quickstart: Organization service sample (C#)
2019

21-
[!INCLUDE[cc-terminology](../includes/cc-terminology.md)]
20+
# Quickstart: Execute an Organization service request (C#)
2221

23-
This is where you begin working with the .NET SDK assemblies to work with data using Microsoft Dataverse.
22+
[!INCLUDE[cc-terminology](../includes/cc-terminology.md)]
2423

25-
In this quickstart, you will create a minimum console application to connect to the Organization service using the <xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient> class. You will pass your connection information using a connection string passed to the constructor.
24+
This topic shows you how to begin using classes in the SDK for .NET assemblies to work with Microsoft Dataverse business data. You will create a minimal console application to connect to your environment's Organization service using the <xref:Microsoft.PowerPlatform.Dataverse.Client.ServiceClient> class and execute a web service operation.
2625

27-
You will use the <xref:Microsoft.Xrm.Sdk.IOrganizationService>.<xref:Microsoft.Xrm.Sdk.IOrganizationService.Execute*> method passing an instance of the <xref:Microsoft.Crm.Sdk.Messages.WhoAmIRequest> class, and you will display the <xref:Microsoft.Crm.Sdk.Messages.WhoAmIResponse>.<xref:Microsoft.Crm.Sdk.Messages.WhoAmIResponse.UserId> value.
26+
Your application will call the <xref:Microsoft.Xrm.Sdk.IOrganizationService>.<xref:Microsoft.Xrm.Sdk.IOrganizationService.Execute*> method passing an instance of the <xref:Microsoft.Crm.Sdk.Messages.WhoAmIRequest> class. The result returned from the web service is a populated <xref:Microsoft.Crm.Sdk.Messages.WhoAmIResponse>.<xref:Microsoft.Crm.Sdk.Messages.WhoAmIResponse.UserId> value which is the unique identifier of your Dataverse system user account.
2827

2928
> [!NOTE]
30-
> This quickstart example does not include error handling. This is a minimum example of what you need to connect to and use the Organization service.
29+
> This quick start example does not include exception handling for brevity. This is a minimum code example of what you need to connect to and use the Organization service.
3130
31+
You can download the complete code sample from GitHub [quickstart-execute-request](https://github.com/microsoft/PowerApps-Samples/blob/master/dataverse/orgsvc/C%23-NETCore/GetStarted/quickstart-execute-request/).
3232

3333
## Prerequisites
3434

35-
- Visual Studio (2019 recommended)
35+
- Visual Studio (2019 or later)
3636
- Internet connection
37-
- Valid user account for a Dataverse instance
38-
- Your username
39-
- Your password
40-
- Url to the Dataverse environment you want to connect with
37+
- Logon credentials of a Dataverse system user account for the target environment
38+
- URL address of the Dataverse environment you want to connect with
4139
- Basic understanding of the Visual C# language
4240

4341
## Create Visual Studio project
4442

45-
1. Create a new Console App (.NET Framework) project using .NET Framework 4.6.2
43+
1. Create a new .NET console app project. For this project we are using Visual Studio 2022 and targeting .NET 6, but .NET Framework will also work.
4644

4745
![Start a console app project.](../media/quick-start-org-service-console-app-1.png)
4846

49-
> [!NOTE]
50-
> This screenshot shows the name `OrgServiceQuickStart`, but you can choose to name the project and solution whatever you want.
51-
5247
1. In **Solution Explorer**, right-click the project you created and select **Manage NuGet Packages...** in the context menu.
5348

5449
![Add NuGet package.](../media/quick-start-org-service-console-app-2.png)
5550

56-
1. Browse for the latest version of the `Microsoft.CrmSdk.XrmTooling.CoreAssembly` NuGet package and install it.
51+
1. Browse for the latest version of the `Microsoft.PowerPlatform.Dataverse.Client` NuGet package and install it.
5752

58-
![Install Microsoft.CrmSdk.XrmTooling.CoreAssembly NuGet package.](../media/quick-start-org-service-console-app-3.png)
53+
![Install Microsoft.PowerPlatform.Dataverse.Client NuGet package.](../media/quick-start-org-service-console-app-3.png)
5954

6055
> [!NOTE]
61-
> You must select **I Accept** in the **Licence Acceptance** dialog.
56+
> Your will be prompted to OK the preview changes, and then select **I Accept** in the **Licence Acceptance** dialog.
6257
63-
## Edit Program.cs
58+
## Add application code
6459

65-
1. Add these using statements to the top of `Program.cs`
60+
1. In **Solution Explorer**, double-click Program.cs to edit that file. Replace the file's contents with the code shown below.
6661

6762
```csharp
6863
using Microsoft.Crm.Sdk.Messages;
69-
using Microsoft.Xrm.Tooling.Connector;
70-
```
71-
72-
1. Replace the `Main` method with the following code. The supported values for *AuthType* are listed in [Connection string parameters](../xrm-tooling/use-connection-strings-xrm-tooling-connect.md).
73-
74-
```csharp
75-
static void Main(string[] args)
76-
{
77-
// e.g. https://yourorg.crm.dynamics.com
78-
string url = "<your environment url>";
79-
80-
string userName = "<your user name>";
81-
// e.g. y0urp455w0rd
82-
string password = "<your password>";
83-
84-
string conn = $@"
85-
Url = {url};
64+
using Microsoft.PowerPlatform.Dataverse.Client;
65+
66+
class Program
67+
{
68+
// TODO Enter your Dataverse environment's URL and logon info.
69+
static string url = "https://yourorg.crm.dynamics.com";
70+
static string userName = "[email protected]";
71+
static string password = "password";
72+
73+
// This service connection string uses the info provided above.
74+
// The AppId and RedirectUri are provided for sample code testing.
75+
static string connectionString = $@"
8676
AuthType = OAuth;
77+
Url = {url};
8778
UserName = {userName};
8879
Password = {password};
8980
AppId = 51f81489-12ee-4a9e-aaae-a2591f45987d;
9081
RedirectUri = app://58145B91-0C36-4500-8554-080854F2AC97;
9182
LoginPrompt=Auto;
9283
RequireNewInstance = True";
9384

94-
using (var svc = new CrmServiceClient(conn))
85+
static void Main(string[] args)
9586
{
96-
97-
WhoAmIRequest request = new WhoAmIRequest();
98-
99-
WhoAmIResponse response = (WhoAmIResponse)svc.Execute(request);
100-
101-
Console.WriteLine("Your UserId is {0}", response.UserId);
102-
87+
using (ServiceClient serviceClient = new(connectionString))
88+
{
89+
if (serviceClient.IsReady)
90+
{
91+
WhoAmIResponse response =
92+
(WhoAmIResponse)serviceClient.Execute(new WhoAmIRequest());
93+
94+
Console.WriteLine("User ID is {0}.", response.UserId);
95+
}
96+
else
97+
{
98+
Console.WriteLine(
99+
"A web service connection was not established.");
100+
}
101+
}
102+
103+
// Pause the console so it does not close.
103104
Console.WriteLine("Press any key to exit.");
104105
Console.ReadLine();
105106
}
106107
}
107108
```
108109

109-
1. Edit the following values to add information for your environment. You can find your environment URL in the Web application under **Settings > Customization > Developer Resources**.
110+
1. Change the values for the environment URL, username, and password as indicated by the TODO code comment.
110111

111-
```csharp
112-
// e.g. https://yourorg.crm.dynamics.com
113-
string url = "<your environment url>";
114-
115-
string userName = "<your user name>";
116-
// e.g. y0urp455w0rd
117-
string password = "<your password>";
118-
```
112+
> [!NOTE]
113+
> You can find supported values for *AuthType* listed in [Connection string parameters](../xrm-tooling/use-connection-strings-xrm-tooling-connect.md#connection-string-parameters). You can find your environment URL in the legacy web application under **Settings > Customization > Developer Resources** or in Power Apps **Settings** (gear icon) > **Developer Resources**.
114+
>
115+
> While this code sample places the username/password information in the code for simplicity, other code samples will use the more recommended approach of prompting for that information or storing it in a separate App.config or appsettings.json file.
119116

120117
## Run the program
121118

122-
1. Press F5 to run the program. The output should look like this:
119+
1. Press F5 to run the program. The output should look something like this:
123120

124121
```bash
125-
Your UserId is 969effb0-98ae-478c-b547-53a2968c2e75
122+
User ID is 969effb0-98ae-478c-b547-53a2968c2e75
126123
Press any key to exit.
127124
```
128125

129-
### Congratulations!
130-
131-
You have successfully connected to the organization service.
132-
133126
## Next Steps
134127

135-
These articles will explain how to work with Dataverse tables:
128+
The console app demonstrates how to connect to the Organization web service using a connection string, execute a web service message request, and access some data in the response. Next, you may want to look at common web service data operations like create, retrieve, update, and delete.
136129

137-
[Entity class operations using the Organization service](entity-operations.md)<br />
138-
[Create table rows using the Organization Service](entity-operations-create.md)<br />
139-
[Retrieve a table row using the Organization Service](entity-operations-retrieve.md)<br />
130+
The following articles will explain how to work with business data in Dataverse tables.
131+
[Entity class operations using the Organization service](entity-operations.md)
132+
[Create table rows using the Organization Service](entity-operations-create.md)
133+
[Retrieve a table row using the Organization Service](entity-operations-retrieve.md)
140134
[Update and delete table rows using the Organization Service](entity-operations-update-delete.md)<br />
141135
[Associate and disassociate table rows using the Organization Service](entity-operations-associate-disassociate.md)
142136

143-
144-
[!INCLUDE[footer-include](../../../includes/footer-banner.md)]
137+
[!INCLUDE[footer-include](../../../includes/footer-banner.md)]

powerapps-docs/maker/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@
610610
href: ./canvas-apps/working-with-variables.md
611611
- name: Understand behavior formulas
612612
href: ./canvas-apps/working-with-formulas-in-depth.md
613-
- name: Use the Search pane (preview)
613+
- name: Use the Search pane
614614
href: ./canvas-apps/search.md
615615
- name: Use Find and Replace in the formula bar
616616
href: ./canvas-apps/formula-bar-find-replace.md

powerapps-docs/maker/canvas-apps/search.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to use the Search pane inside Power Apps Studio to find t
44
author: TashasEv
55
ms.topic: conceptual
66
ms.custom: canvas
7-
ms.reviewer: tapanm
7+
ms.reviewer: mkaur
88
ms.date: 06/29/2022
99
ms.subservice: canvas-maker
1010
ms.author: tashas
@@ -15,45 +15,21 @@ search.app:
1515
contributors:
1616
- tapanm-msft
1717
- TashasEv
18+
- mduelae
1819
---
1920

20-
# Use the Search pane (preview)
21-
22-
[This article is pre-release documentation and is subject to change.]
21+
# Use the Search pane
2322

2423
You can now use the Search pane to locate objects&mdash;like media files, variables, collections, and data sources&mdash;across your app. You can also use the Search pane to find repeated instances of strings in formulas. For example, using the Search pane, you can look for each instance of `HoverColor` to determine the setting for that property in other areas of your app. You can use the Search pane to learn more about what's being used by your app, where, and you can go right to those results to make any necessary updates. In addition, you can use the replace capability to update one or more instances of text, variables, collections, or formula references.
2524

26-
> [!IMPORTANT]
27-
> - This is a preview feature.
28-
> - [!INCLUDE[cc_preview_features_definition](../../includes/cc-preview-features-definition.md)]
29-
> - This feature is being rolled out, and&mdash;depending on your region&mdash;it might not be available for your tenant yet.
25+
:::image type="content" source="media/search/search-pane-1.png" alt-text="The Search pane visible inside Power Apps Studio.":::
3026

3127
## Prerequisites
3228

3329
- [Sign up](../signup-for-powerapps.md) for Power Apps.
3430
- [Create an app from a template](get-started-test-drive.md), [create a new app](data-platform-create-app.md), or [open an existing app](edit-app.md) in Power Apps.
3531
- [Learn how to configure a control](add-configure-controls.md).
3632

37-
## Enable the Search pane
38-
39-
The Search pane is enabled on new apps by default. However, you need to manually enable it on existing apps.
40-
41-
To enable the Search pane on existing apps:
42-
43-
1. Open an [existing](edit-app.md) app in Power Apps Studio.
44-
45-
1. Select **Settings** at the top.
46-
47-
1. Select **Upcoming features**.
48-
49-
1. On the **Preview** tab, select **Search**.
50-
51-
:::image type="content" source="media/search/enable-search.png" alt-text="The Search feature listed in the preview section of upcoming features in settings.":::
52-
53-
The Search pane is enabled.
54-
55-
:::image type="content" source="media/search/search-pane-1.png" alt-text="The Search pane visible inside Power Apps Studio.":::
56-
5733
## Open the Search pane
5834

5935
You can open the Search pane by selecting **Search** ![Search icon](media/search/search-icon.png). You can also use shortcut keys by selecting **Ctrl**+**F** when your cursor is outside the formula bar, or selecting **Ctrl**+**Shift**+**F** when your cursor is inside the formula bar.

0 commit comments

Comments
 (0)