Skip to content

Commit 98241bf

Browse files
committed
tidy up
1 parent 08e63fe commit 98241bf

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Grid OnRecordSelect event (Client API reference) in model-driven apps| M
33
description: Includes description and supported parameters for the grid OnRecordSelect event.
44
author: jasongre
55
ms.author: jasongre
6-
ms.date: 06/28/2023
6+
ms.date: 06/29/2023
77
ms.reviewer: jdaly
88
ms.topic: reference
99
applies_to: "Dynamics 365 (online)"
@@ -23,19 +23,20 @@ There might be situations where you don't want the table record to open (which i
2323

2424
### Step 1: Create a web resource
2525

26-
Create, save and publish a JavaScript (JS) web resource that contains the following code:
26+
Create, save and publish a JavaScript (JS) web resource that contains the following code:
2727

28-
```JavaScript
29-
function ChangeBehavior(){
28+
```JavaScript
29+
function OnSelect(context) {
30+
var pageInput = {
31+
pageType: "entityrecord",
32+
entityName: "contact",
33+
entityId: context.getFormContext().data.entity.getId()
34+
};
35+
Xrm.Navigation.navigateTo(pageInput);
36+
}
37+
```
3038

31-
// Enter the url
32-
var url = "Enter the URL";
33-
var OpenUrlOptions = {height: 800, width: 1000};
34-
Xrm.Navigation.openUrl(url, openUrlOptions);
35-
}
36-
```
37-
38-
More information: [Create or edit model-driven app web resources ](../../../../../maker/model-driven-apps/create-edit-web-resources.md)
39+
More information: [Create or edit model-driven app web resources](../../../../../maker/model-driven-apps/create-edit-web-resources.md)
3940

4041
### Step 2: Enable Power Apps Grid Control
4142

@@ -50,7 +51,7 @@ When enabling the **Power Apps Grid Control**, an **Events** tab appears. Select
5051

5152
1. Under the **Form Libraries** section, add the Form Library from the web resource just created.
5253
1. Under the **Event Handlers** section, select the event **OnRecordSelect** and click **Add**, a popup will appear.
53-
1. In the popup, select the form library just added and the function name **ChangeBehavior**. This is the name of the JavaScript function created in the web resource.
54+
1. In the popup, select the form library just added and the function name **OnSelect**. This is the name of the JavaScript function created in the web resource.
5455

5556

5657
More information: [Power Apps grid control](../../../../../maker/model-driven-apps/the-power-apps-grid-control.md)

0 commit comments

Comments
 (0)