You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/developer/model-driven-apps/open-forms-views-dialogs-reports-url.md
+67-21Lines changed: 67 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
-
title: "Open forms, views, dialogs, and reports with a URL (model-driven apps) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
2
+
title: "Open apps, forms, views, dialogs, and reports with a URL (model-driven apps) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
3
3
description: "Learn more about URL addressable elements that enable you to include links to forms, views, dialogs, and reports in other applications"# 115-145 characters including spaces. This abstract displays in the search result.
4
4
ms.author: jdaly
5
5
author: HemantGaur
6
6
manager: evchaki
7
-
ms.date: 04/01/2022
7
+
ms.date: 04/06/2022
8
8
ms.reviewer: jdaly
9
9
ms.topic: "article"
10
10
ms.subservice: mda-developer
@@ -16,24 +16,65 @@ search.app:
16
16
contributors:
17
17
- JimDaly
18
18
---
19
-
# Open forms, views, dialogs, and reports with a URL
19
+
# Open apps, forms, views, dialogs, and reports with a URL
20
20
21
-
URL addressable elements enable you to include links to forms, views, dialogs, and reports in other applications. In this manner, you can easily extend other applications, reports, or websites so that users can view information and perform actions without switching applications.
21
+
URL addressable elements enable you to include links to apps, forms, views, dialogs, and reports in other applications.
22
22
23
23
> [!NOTE]
24
-
> - URL addressable forms, views, dialogs, and reports cannot bypass the security. Only licensed users, based on their security roles, can access the data and the records they see.
25
-
> - Use `Xrm.Navigation.`[openForm](clientapi/reference/Xrm-Navigation/openForm.md) when you open forms programmatically within the application by using web resources. Do not use `window.open`.
26
-
> - Outside the application, where pages do not have access to the `Xrm.Navigation.`[openForm](clientapi/reference/Xrm-Navigation/openForm.md) function, use `window.open` or a link to open a specific record or form for a table.
24
+
> URL addressable apps, forms, views, dialogs, and reports cannot bypass the security. Only licensed users, based on their security roles, can access the data and the records they see.
25
+
26
+
## App Urls
27
+
28
+
> [!NOTE]
29
+
> Embedding a model-driven application within an IFrame in another application is not supported.
30
+
31
+
You can open any model-driven application using the [AppModule.UniqueName](/powerapps/developer/data-platform/reference/entities/appmodule#BKMK_UniqueName) or [AppModule.AppModuleId](/powerapps/developer/data-platform/reference/entities/appmodule#BKMK_AppModuleId) values.
32
+
33
+
You can retrieve these values using Web API using the following query:
34
+
35
+
```http
36
+
GET [Organization URI]/api/data/v9.1/appmodules?$select=appmoduleid,uniquename
37
+
```
38
+
39
+
More information: [Query data using the Web API](../data-platform/webapi/query-data-web-api.md)
40
+
41
+
You can use either the `appname` or `appid` query parameters with the Unique Name or AppModuleId values respectively, but you cannot use both at the same time.
42
+
43
+
### Using Unique Name
44
+
45
+
Append the `appname` query parameter to the `main.aspx` page to open the app using the Unique Name.
> Opening forms in a dialog window by using [showModalDialog](/previous-versions/ms536759(v=vs.85)) or [showModelessDialog](https://msdn.microsoft.com/library/ie/ms536761.aspx) is not supported.
54
-
>
94
+
> - Use `Xrm.Navigation.`[navigateTo](clientapi/reference/Xrm-Navigation/navigateTo.md) or `Xrm.Navigation.`[openForm](clientapi/reference/Xrm-Navigation/openForm.md) when you open forms programmatically within the application by using web resources. Do not use `window.open`.
95
+
> - Outside the application, where pages do not have access to the `Xrm.Navigation.openForm` or `Xrm.Navigation.navigateTo` functions, use `window.open` or a link to open a specific record or form for a table.
55
96
> Displaying a form within an IFrame embedded in another form is not supported.
56
97
57
98
You will typically use the [getClientUrl](clientapi/reference/Xrm-Utility/getGlobalContext/getClientUrl.md) method to retrieve the organization root Url for Model-driven apps.
> The id parameter passed to the URL is the encoded id value for the record. In this example the id value is `{899D4FCF-F4D3-E011-9D26-00155DBA3819}`. The encoded version of the GUID substitutes opening and closing brackets “{” and “}” with “%7B” and “%7D”, respectively,
109
+
> The id parameter passed to the URL is the encoded id value for the record. In this example the id value is `{899D4FCF-F4D3-E011-9D26-00155DBA3819}`. The encoded version of the GUID substitutes opening and closing brackets `{` and `}` with `%7B` and `%7D`, respectively,
69
110
70
111
The following are the query string parameters used with the main.aspx page to open forms or views:
71
112
@@ -114,7 +155,7 @@ To display a list of table records within the application for a SubArea set the
114
155
However, if you want to have a SubArea element that uses a specific initial default view, use the following Url pattern.
115
156
116
157
```xml
117
-
Url=“/main.aspx?appid=e2bc1066-488f-eb11-b1ac-000d3a56ead9&pagetype=entitylist&etn=account&viewid=%7b<GUID value of view id>%7d”
158
+
Url="/main.aspx?appid=e2bc1066-488f-eb11-b1ac-000d3a56ead9&pagetype=entitylist&etn=account&viewid=%7b<GUID value of view id>%7d"
118
159
```
119
160
120
161
When you use this URL, you must also specify appropriate values for `<Titles>` and `<Descriptions>`, and specify an icon for the table.
> [Dialogs are deprecated](/power-platform/important-changes-coming#process-dialogs-are-deprecated). You should replace dialogs with business process flows or canvas apps. More information: [Replace dialogs with business process flows or canvas apps](/power-automate/replace-dialogs)
172
+
129
173
A common customization is to enable a user to open a specific dialog process in the context of a specific record. For example, you might want to add a custom button to the ribbon for a specific table using the id value for current record as an input parameter for the dialog process.
130
174
131
175
To open a dialog you need the following:
@@ -145,7 +189,7 @@ To open a dialog you need the following:
145
189
[organization url]/cs/dialog/rundialog.aspx?DialogId=[dialog unique identifier]&EntityName=[table logical name]&ObjectId=[unique identifier for the record]
146
190
```
147
191
148
-
For example, to open the dialog with id ={6A6E93C9-1FE6-4C07-91A9-E0E2A7C70976} with the account record id = {40C9ADFD-90A8-DF11-840E-00155DBA380F}, use the URL in the following example.
192
+
For example, to open the dialog with id =`{6A6E93C9-1FE6-4C07-91A9-E0E2A7C70976}` with the account record id = `{40C9ADFD-90A8-DF11-840E-00155DBA380F}`, use the URL in the following example.
0 commit comments