Skip to content

Commit 5d057c3

Browse files
authored
Live publish
2 parents 1ff0437 + a7d883a commit 5d057c3

21 files changed

+233
-36
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@
359359
href: appendix-app-design-best-practices-checklist.md
360360
- name: 'Appendix: App certification checklist'
361361
href: appendix-app-certification-checklist.md
362+
- name: 'Appendix: Add licensing information to your solution'
363+
href: appendix-add-license-information-to-your-solution.md
362364
- name: Monitor your app in ISV Studio
363365
items:
364366
- name: Introduction to ISV Studio
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
title: "Appendix: Add licensing information to your solution | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3+
description: "This article outlines the required steps to take license service IDs created in Partner Center and add them to the table definitions of your Dataverse solution." # 115-145 characters including spaces. This abstract displays in the search result.
4+
ms.custom: ""
5+
ms.date: 04/30/2021
6+
ms.reviewer: "pehecke"
7+
ms.service: "powerapps"
8+
ms.topic: "article"
9+
author: "nkrb"
10+
ms.author: "nabuthuk"
11+
manager: "kvivek"
12+
search.audienceType:
13+
- developer
14+
search.app:
15+
- PowerApps
16+
- D365CE
17+
---
18+
19+
# Appendix: Add licensing information to your solution
20+
21+
This article is related to the license management capability that Microsoft provides for ISVs to manage and enforce licenses for their products. More information: [Third-party app license management through Microsoft](https://docs.microsoft.com/azure/marketplace/third-party-license)
22+
23+
This article outlines how to add licensing information to a Microsoft Dataverse solution, package it, and upload the solution zip file to Microsoft AppSource. More information: [Create an AppSource package for your app](/powerapps/developer/data-platform/create-package-app-appsource).
24+
25+
The following steps are required to add license information to your solution:
26+
27+
- Clone existing solution.
28+
- Use the Power Apps CLI tool to add license information to the solution.
29+
- Build the solution, package it, and upload the zip file to AppSource.
30+
31+
## Download the latest version of the Power Apps CLI
32+
33+
You can download the latest version of Power Apps CLI from [here](/powerapps/developer/data-platform/powerapps-cli). The Power Apps CLI tool includes commands that are required for adding licensing information to the solution. To verify that you have the latest version of the tool:
34+
35+
1. Open a **Developer Command Prompt for VS 2017** or higher window.
36+
2. Enter the command `pac install latest`. This will install the latest version of the tooling.
37+
3. Enter the command `pac solution help` and verify that you see the `add-license` option in the list.
38+
39+
## Clone a solution
40+
41+
Use Power Apps CLI commands to clone the solution. To clone a solution:
42+
43+
1. Create an authentication profile for the environment where you want to add your solution by using the command:
44+
45+
```CLI
46+
pac auth create --name <name of your choice> --kind Dataverse -–url <your dataverse url> --username <your username> --password <your password>`
47+
```
48+
1. Clone the existing solution by using the command:
49+
50+
```CLI
51+
pac solution clone --name <your solution name> --outputDirectory <your chosen output directory>
52+
```
53+
54+
## Create licensing files
55+
56+
To add licensing information to your solution, you need to create two `.CSV` files using the text editor of your choice. The following are the two files that you need to create:
57+
58+
- **Plan definition file**: Define the details of the plans you created in the Partner Center.
59+
- **Plan mapping file**: Maps those plans to the components of your solution.
60+
61+
In this article, we will create these two CSV files for an example solution called F365. This solution contains several model-driven apps for which we want to restrict access to via license management. We will follow a **Russian doll** licensing model for this solution as shown in the following table:
62+
63+
|Plan|Gets access to|
64+
|------|--------|
65+
|Gold plan|Gold App, Silver App, Bronze App|
66+
|Silver plan|Silver App, Bronze App|
67+
|Bronze plan|Bronze App|
68+
|||
69+
70+
> [!div class="mx-imgBorder"]
71+
> ![Create licensing file 1](media/create-license-csv-file-1.png "Create licensing file 1")
72+
73+
To add licensing information to your solution, you need to create plans in the Partner Center. More information: [Create plans in Partner Center](/azure/marketplace/dynamics-365-customer-engage-plans). Once you're finished creating the plans, each plan creates a **Service ID** value which is required while creating [Plan definition file](#plan-definition-file).
74+
75+
> [!div class="mx-imgBorder"]
76+
> ![Create licensing file 3](media/create-license-csv-file-3.png "Create licensing file 3")
77+
78+
> [!NOTE]
79+
> Currently model-driven apps are the only types of solution components that can be mapped to licenses. In future releases, we plan to add support for other component types such as canvas apps and tables.
80+
81+
### Plan definition file
82+
83+
The plan definition file must include the following columns laid out in the format shown in the example below:
84+
85+
> [!div class="mx-imgBorder"]
86+
> ![Plan definition file](media/plan-definition-file.png "Plan definition file")
87+
88+
**Service ID:** This is created automatically when you create a plan in the Partner Center as part of the offer creation. Copy it from partner center into the plan definition file. More information: [Create plans in Partner Center](/azure/marketplace/dynamics-365-customer-engage-plans).
89+
90+
91+
### Plan mapping file
92+
93+
The plan mapping file must include the following columns laid out in the format shown in the example below:
94+
95+
> [!div class="mx-imgBorder"]
96+
> ![Plan mapping file](media/plan-mapping-file.png "Plan mapping file")
97+
98+
**Service ID:** This is created automatically when you create a plan in the Partner Center as part of the offer creation. Copy it from partner center into the plan definition file. More information: [Create plans in Partner Center](/azure/marketplace/dynamics-365-customer-engage-plans).
99+
100+
**Component name:** The solution component that you would like to restrict access to using license management. This name must match the name of the component in the **Name** column in the Power Apps solution viewer (image above).
101+
102+
103+
104+
Once you have created your own licensing CSV files, the next step is to add the information from these files to your solution.
105+
106+
## Add licensing information
107+
108+
To add the license information from the CSV files (created above) to the solution:
109+
110+
1. Open a **Developer Command Prompt for VS 2017** or higher window. Navigate to the ___location where you have cloned solution. Enter the following command:
111+
112+
```CLI
113+
pac solution add-license -pd <path to plan definition file> -pm <path to plan mapping file>
114+
```
115+
1. To check whether the licensing information is added, navigate to the ___location where you have cloned your solution zip file, you should see a new folder **ServicePlans** is created with two XML files.
116+
1. Optional: To determine how the license information from the CSV files was captured, open the XML files in your favorite editor.
117+
- The **ServicePlans.xml** file contains the plan definition information from the plan definition file.
118+
- The **ServicePlansAppModules.xml** file contains the plan mapping information from the plan mapping file.
119+
120+
## Build the solution and create an AppSource package
121+
122+
1. To build a solution, see [Create a managed solution for your app](/powerapps/developer/data-platform/create-solution-app-appsource).
123+
124+
1. To validate whether the licensing information is included, after the solution is built, look for the licensing information in your solution `customizations.xml` file.
125+
1. To create the AppSource package, see [Create an AppSource package for your app](/powerapps/developer/data-platform/create-package-app-appsource).
126+
127+
## See also
128+
129+
[Appendix: App certification checklist](appendix-app-certification-checklist.md)

powerapps-docs/developer/data-platform/handle-exceptions.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Handle exceptions in a plug-in (Microsoft Dataverse) | Microsoft Docs"
33
description: "Understand system behavior when a plug-in passes an exception back to the caller."
44
ms.custom: ""
5-
ms.date: 03/15/2021
5+
ms.date: 04/30/2021
66
ms.reviewer: "pehecke"
77
ms.service: powerapps
88
ms.topic: "article"
@@ -53,4 +53,13 @@ However, when any exception occurs in the plug-in code for a synchronous step, t
5353

5454
The exception message for asynchronous registered plug-ins is written to a **System Job** table, also known as the [AsyncOperation Table](reference/entities/asyncoperation.md) which can be viewed in the **System Jobs** area of the web application. No dialog will be displayed to the user. Async plug-ins do not participate in the database transaction that queued them, therefore they cannot cancel the transaction.
5555

56+
### Retry an asynchronous plug-in
57+
58+
With an asynchronous plug-in step, you can re-try when a plug-in fails. This may be due to a network error or some other re-triable error calling an external resource.
59+
60+
To retry your plug-in, use the [InvalidPluginExecutionException(OperationStatus, Int32, String)](/dotnet/api/microsoft.xrm.sdk.invalidpluginexecutionexception.-ctor?view=dynamics-general-ce-9#Microsoft_Xrm_Sdk_InvalidPluginExecutionException__ctor_Microsoft_Xrm_Sdk_OperationStatus_System_Int32_System_String_) constructor using the [OperationStatus Enum](/dotnet/api/microsoft.xrm.sdk.operationstatus?view=dynamics-general-ce-9) `Retry` member value.
61+
62+
When your plug-in throws this type of exception, the asynchronous service will attempt to run your plug-in four times. If it doesn't succeed within four attempts it will fail.
63+
64+
5665
[!INCLUDE[footer-include](../../includes/footer-banner.md)]
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)