Skip to content

Commit 605f3f4

Browse files
authored
Merge pull request #7002 from MicrosoftDocs/main
updating working
2 parents ee98da5 + 3de82ca commit 605f3f4

27 files changed

+183
-88
lines changed

powerapps-docs/developer/data-platform/api-limits.md

Lines changed: 29 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
---
22
title: "Service protection API limits (Microsoft Dataverse) | Microsoft Docs"
3-
description: "Understand the service protection limits for API requests."
4-
ms.custom: ""
5-
ms.date: 09/14/2022
6-
ms.reviewer: "jdaly"
7-
ms.topic: "article"
8-
author: "divka78"
3+
description: "Understand what a developer needs to do to manage service protection limits for API requests."
4+
ms.date: 09/15/2022
5+
ms.reviewer: jdaly
6+
ms.topic: article
7+
author: divka78
98
ms.subservice: dataverse-developer
10-
ms.author: "jdaly"
11-
manager: "ryjones"
9+
ms.author: dikamath
1210
search.audienceType:
1311
- developer
1412
search.app:
@@ -251,61 +249,39 @@ If you are using the Web API with a client library, you may find that it support
251249
If you have written your own library, you can include behaviors to be similar to the one included in this sample code for a helper [WebAPIService class library (C#)](webapi/samples/webapiservice.md).
252250

253251
```csharp
254-
private async Task<HttpResponseMessage> SendAsync(
255-
HttpRequestMessage request,
256-
HttpCompletionOption httpCompletionOption = HttpCompletionOption.ResponseHeadersRead,
257-
int retryCount = 0)
252+
/// <summary>
253+
/// Specifies the Retry policies
254+
/// </summary>
255+
/// <param name="config">Configuration data for the service</param>
256+
/// <returns></returns>
257+
static IAsyncPolicy<HttpResponseMessage> GetRetryPolicy(Config config)
258258
{
259-
HttpResponseMessage response;
260-
try
261-
{
262-
//The request is cloned so it can be sent again.
263-
response = await httpClient.SendAsync(request.Clone(), httpCompletionOption);
264-
}
265-
catch (Exception)
266-
{
267-
throw;
268-
}
269-
270-
if (!response.IsSuccessStatusCode)
271-
{
272-
if ((int)response.StatusCode != 429)
273-
{
274-
//Not a service protection limit error
275-
throw ParseError(response);
276-
}
277-
else
278-
{
279-
// Give up re-trying if exceeding the maxRetries
280-
if (++retryCount >= config.MaxRetries)
281-
{
282-
throw ParseError(response);
283-
}
284-
259+
return HttpPolicyExtensions
260+
.HandleTransientHttpError()
261+
.OrResult(httpResponseMessage => httpResponseMessage.StatusCode == System.Net.HttpStatusCode.TooManyRequests)
262+
.WaitAndRetryAsync(
263+
retryCount: config.MaxRetries,
264+
sleepDurationProvider: (count, response, context) =>
265+
{
285266
int seconds;
286-
//Try to use the Retry-After header value if it is returned.
287-
if (response.Headers.Contains("Retry-After"))
267+
HttpResponseHeaders headers = response.Result.Headers;
268+
269+
if (headers.Contains("Retry-After"))
288270
{
289-
seconds = int.Parse(response.Headers.GetValues("Retry-After").FirstOrDefault());
271+
seconds = int.Parse(headers.GetValues("Retry-After").FirstOrDefault());
290272
}
291273
else
292274
{
293-
//Otherwise, use an exponential backoff strategy
294-
seconds = (int)Math.Pow(2, retryCount);
275+
seconds = (int)Math.Pow(2, count);
295276
}
296-
await Task.Delay(TimeSpan.FromSeconds(seconds));
297-
298-
return await SendAsync(request, httpCompletionOption, retryCount);
299-
}
300-
}
301-
else
302-
{
303-
return response;
304-
}
277+
return TimeSpan.FromSeconds(seconds);
278+
},
279+
onRetryAsync: (_, _, _, _) => { return Task.CompletedTask; }
280+
);
305281
}
306282
```
307283

308-
You may also want to use [Polly](https://github.com/App-vNext/Polly), a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner.
284+
This example uses [Polly](https://github.com/App-vNext/Polly), a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner.
309285

310286
### HTTP Response headers
311287

Loading

powerapps-docs/developer/model-driven-apps/clientapi/reference/events/form-onsave.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ description: Includes description and supported parameters for the form OnSave e
44
ms.author: jdaly
55
author: adrianorth
66
manager: kvivek
7-
ms.date: 06/24/2022
7+
ms.date: 09/15/2022
88
ms.reviewer: jdaly
9-
ms.topic: "reference"
9+
ms.topic: reference
1010
applies_to: "Dynamics 365 (online)"
1111
search.audienceType:
1212
- developer
@@ -27,7 +27,9 @@ The `OnSave` event occurs when:
2727
- Code executes the [formContext.data.save](../formContext-data/save.md) method and there is unsaved data in the form.
2828
- Code executes the [formContext.data.refresh](../formContext-data/refresh.md) method passing a true value as the first parameter and there is unsaved data in the form.
2929

30-
To determine which button was clicked to perform the save, use the getSaveMode method.
30+
[!INCLUDE [cc_book-instead-of-save](../../../../../includes/cc_book-instead-of-save.md)]
31+
32+
To determine which button was clicked to perform the save, use the [getSaveMode method](../save-event-arguments/getSaveMode.md) method.
3133

3234
You can cancel the save action by using the preventDefault method within the event arguments object. The preventDefault method is accessible by using the getEventArgs method that is part of the execution context. Execution context is automatically passed to the form event handler.
3335

powerapps-docs/developer/model-driven-apps/clientapi/reference/events/grid-onsave.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ title: "Grid OnSave event (Client API reference) in model-driven apps| Microsoft
33
description: Includes description and supported parameters for the grid OnSave event.
44
ms.author: jdaly
55
author: adrianorth
6-
manager: kvivek
7-
ms.date: 03/12/2022
6+
ms.date: 09/15/2022
87
ms.reviewer: jdaly
9-
ms.topic: "reference"
8+
ms.topic: reference
109
applies_to: "Dynamics 365 (online)"
1110
search.audienceType:
1211
- developer
@@ -21,7 +20,7 @@ contributors:
2120
The `OnSave` event occurs before sending the updated information to the server, and when any of the following occurs:
2221

2322
- There is a change in the record selection.
24-
- The user explicitly triggers a save operation using the editable grids save button.
23+
- The user explicitly triggers a save operation using the editable grid's save button.
2524
- The user applies a sort, filter, group, pagination, or navigation operation from the editable grid while there are pending changes.
2625

2726
Some important points to consider for the `OnSave` event:
@@ -33,7 +32,10 @@ Some important points to consider for the `OnSave` event:
3332
- Editable grid control does not implement an auto-save timer.
3433
Editable grid suppresses duplicate detection rules.
3534

35+
[!INCLUDE [cc_book-instead-of-save](../../../../../includes/cc_book-instead-of-save.md)]
36+
3637
### Related topic
38+
3739
[Form OnSave Event](form-onsave.md)
3840

3941

powerapps-docs/developer/model-driven-apps/clientapi/reference/events/postsave.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ description: Information about PostSave event methods.
44
ms.author: jdaly
55
author: adrianorth
66
manager: kvivek
7-
ms.date: 03/12/2022
7+
ms.date: 09/15/2022
88
ms.reviewer: jdaly
9-
ms.topic: "reference"
9+
ms.topic: reference
1010
applies_to: "Dynamics 365 (online)"
1111
search.audienceType:
1212
- developer
@@ -21,6 +21,8 @@ contributors:
2121

2222
PostSave event occurs after the `OnSave` event is complete. This event is used to support or execute custom logic using web resources to perform after `Save` actions when the `save` event is successful or failed due to server errors.
2323

24+
[!INCLUDE [cc_book-instead-of-save](../../../../../includes/cc_book-instead-of-save.md)]
25+
2426
Use the [addOnPostSave](../controls/addOnPostSave.md) and [removeOnPostSave](../controls/removeOnPostSave.md) methods to manage event handlers for this event.
2527

2628
> [!NOTE]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> [!NOTE]
2+
> The `OnSave` event for appointment, recurring appointment, or service activity records will cancel the save operation and use the `Book` message to persist the change rather than `Create` or `Update`. Because of this, `OnSave` and `PostSave` event handlers for these tables will not work.

powerapps-docs/maker/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@
221221
href: ./canvas-apps/intro-maker-portal.md
222222
- name: Find it with unified search
223223
href: search.md
224+
- name: Get help from a virtual agent
225+
href: ./common/virtual-agent.md
224226
- name: Canvas apps
225227
items:
226228
- name: Canvas apps
Loading

powerapps-docs/maker/canvas-apps/power-apps-studio.md

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ contributors:
1818
---
1919
# Understand Power Apps Studio
2020

21-
[This article is pre-release documentation and is subject to change.]
2221

2322
When you create a canvas app by using any method, you're taken to the canvas app
2423
builder called Power Apps Studio. You can use Power Apps Studio to design, build, and manage your canvas app.
@@ -46,9 +45,12 @@ menu item for authoring the app.
4645

4746
1. [Properties pane](#8--properties-pane) - properties list for the selected object in UI format.
4847

49-
1. [Screen selector](#9--screen-selector) - switch between different screens in an app.
48+
1. [Virtual agent](#9--virtual-agent) - get help building your app from a virtual agent.
49+
50+
1. [Screen selector](#10--screen-selector) - switch between different screens in an app.
51+
52+
1. [Change canvas screen size](#11--change-canvas-screen-size) - change the size of the canvas during an authoring experience in Power Apps Studio.
5053

51-
1. [Change canvas screen size](#10--change-canvas-screen-size) - change the size of the canvas during an authoring experience in Power Apps Studio.
5254

5355
Let's understand each option in Power Apps Studio in detail.
5456

@@ -62,31 +64,12 @@ options are relevant to the current session and app-related settings.
6264
> ![Power Apps Studio options.](media/studio/pa-studio-options.png)
6365
6466

65-
### Modern command bar (preview)
67+
### Modern command bar
6668

6769
The modern command bar displays the relevant set of commands depending on the control that is selected.
6870

6971
![This image shows how the command bar changes depending which control is selected.](media/studio/pa-studio-command-bar.gif)
7072

71-
> [!IMPORTANT]
72-
> - This feature is being rolled out and depending on your region, it may not be available for your tenant yet.
73-
> - This is a preview feature.
74-
> - Preview features aren’t meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.
75-
76-
#### Enable the modern command bar
77-
78-
The modern command bar needs to be enabled manually through the feature switch. To enable the feature:
79-
80-
1. Open a [new](data-platform-create-app.md) or an [existing](edit-app.md) app in Power Apps Studio.
81-
82-
1. Select **Settings** at the top.
83-
84-
1. Select **Upcoming features**.
85-
86-
1. Under the **Preview** tab, set the toggle to **On** for **Enable modern command bar**.
87-
88-
> [!div class="mx-imgBorder"]
89-
> ![Enable the modern command bar.](media/studio/pa-studio-enable-modern-bar.png)
9073

9174
The command bar changes when one of the following control or object is selected:
9275

@@ -467,12 +450,17 @@ selected object on the canvas. The **Properties** tab shows generic options such
467450
> [!div class="mx-imgBorder"]
468451
> ![Properties pane.](media/studio/pa-studio-prop-pane.png)
469452
470-
## 9 – Screen selector
453+
454+
## 9 – Virtual agent
455+
456+
Real-time, in-product help is available from the documentation using the Power Platform virtual agent. The virtual agent can help answer questions about common scenarios. More information: [Get help building your app from a virtual agent](../common/virtual-agent.md).
457+
458+
## 10 – Screen selector
471459

472460
Use the screen selector to switch between screens when your canvas app has multiple screens. You can also select a screen from the left pane by selecting the
473461
tree view. If the current selection is inside a container, or inside an individual cell in a gallery, the selector shows the breadcrumbs for the parent elements at each level.
474462

475-
## 10 – Change canvas screen size
463+
## 11 – Change canvas screen size
476464

477465
You can zoom in or zoom out while authoring the canvas app. Select **Ctrl**+**0**
478466
**Fit to window** to fit the screen size
Loading

0 commit comments

Comments
 (0)