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/data-platform/build-and-package.md
+39-7Lines changed: 39 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Build and package plug-in code
3
3
description: Learn about building plug-in code into assemblies and packages for later registration and upload to the Microsoft Dataverse service.
4
-
ms.date: 02/26/2024
4
+
ms.date: 02/29/2024
5
5
ms.reviewer: pehecke
6
6
ms.topic: article
7
7
author: divkamath
@@ -32,15 +32,15 @@ Your assembly may include multiple plug-in classes (or types) and even custom wo
32
32
33
33
### Signed assemblies are required
34
34
35
-
Assemblies must be signed before they can be registered with Dataverse only if you are not using the [dependent assemblies](#dependent-assemblies) capability. You can use the Visual Studio **Signing** tab in your project's properties or the [Sn.exe (Strong Name Tool)](/dotnet/framework/tools/sn-exe-strong-name-tool) command to sign the assembly.
35
+
Assemblies must be signed before they can be registered with Dataverse only if you aren't using the [dependent assemblies](#dependent-assemblies) capability. You can use the Visual Studio **Signing** tab in your project's properties or the [Sn.exe (Strong Name Tool)](/dotnet/framework/tools/sn-exe-strong-name-tool) command to sign the assembly.
36
36
37
37
### Dependency on the CoreAssemblies NuGet package
38
38
39
-
Adding the `Microsoft.CrmSdk.CoreAssemblies` NuGet package to your project includes the required Dataverse assembly references in your project, but it doesn't upload these assemblies along with your plug-in assembly as these assemblies already exist in the server's sandbox run-time where your code will execute.
39
+
Adding the `Microsoft.CrmSdk.CoreAssemblies` NuGet package to your project includes the required Dataverse assembly references in your project, but it doesn't upload these assemblies along with your plug-in assembly as these assemblies already exist in the server's sandbox run-time where your code executes.
40
40
41
41
### Where to go next
42
42
43
-
If you are interested in learning about or using dependent assemblies, continue reading the next section in this article. If not, proceed to [Register a plug-in](register-plug-in.md).
43
+
If you're interested in learning about or using dependent assemblies, continue reading the next section in this article. If not, proceed to [Register a plug-in](register-plug-in.md).
44
44
45
45
## Dependent assemblies
46
46
@@ -68,7 +68,7 @@ When you register individual plug-in assemblies without the dependent assemblies
68
68
69
69
> [!IMPORTANT]
70
70
> If you sign your assemblies, be aware that signed assemblies cannot use resources contained in unsigned assemblies. If you sign your plug-in assemblies or any dependent assembly, all the assemblies that those assemblies depend on must be signed.
71
-
>
71
+
>
72
72
> If any signed assemblies depend on unsigned assemblies, you will get an error similar to the following: Could not load file or assembly \<AssemblyName>, Version=\<Version>, Culture=neutral, PublicKeyToken=null or one of its dependencies. A strongly-named assembly is required.
73
73
74
74
### Dependent assemblies limitations
@@ -77,15 +77,47 @@ The following limitations apply when using plug-in dependent assemblies.
77
77
78
78
-[Workflow extensions](workflow/workflow-extensions.md), also known as *custom workflow activities* aren't supported when using the dependent assemblies capability.
79
79
- On-premises environments aren't supported.
80
-
- Un-managed code isn't supported. You can't include references to unmanaged resources.
80
+
- Un-managed code isn't supported. You can't include references to un-managed resources.
81
81
82
82
## Creating a plug-in package
83
83
84
-
Your plug-in assembly plus any required dependent assemblies can be placed together in a NuGet package and then registered and uploaded to the Dataverse server. You do not need to create a package if your plug-in project does not require any dependent assemblies at run-time, other than what ships in the Microsoft.CrmSdk.CoreAssemblies NuGet package.
84
+
Your plug-in assembly plus any required dependent assemblies can be placed together in a NuGet package and then registered and uploaded to the Dataverse server. You don't need to create a package if your plug-in project doesn't require any dependent assemblies at run-time, other than what ships in the Microsoft.CrmSdk.CoreAssemblies NuGet package.
85
85
86
86
<!-- Add correct links when available -->
87
87
Instructions for creating a plug-in package using an interactive tool can be found in these separate how-to's: [Create and register a plug-in package using PAC CLI](/power-platform/developer/howto/cli-create-package), [Create and register a plug-in package using Visual Studio](/power-platform/developer/howto/vs-create-package).
88
88
89
+
## All projects must be in the SDK style
90
+
91
+
A plug-in package must only contain custom assemblies that are built from a project file in a specific format known as the *SDK style*. Failure to follow this rule results in an error ("file can not be found") when attempting to register the package using the Plug-in Registration tool.
92
+
93
+
> [!IMPORTANT]
94
+
> All MSBuild projects, where the resulting compiled assembly is to be added to a plug-in package, must be in the "SDK style" format.
95
+
96
+
An SDK style project is one where the contents of the project's .csproj file contains the following line of code: `<Project Sdk="Microsoft.NET.Sdk">`.
97
+
98
+
When you create a plug-in project using one of our tools, for example the Power Platform CLI `pac plugin init` command, the plug-in project file is in the correct format. Here's an example of such a project file.
If you're adding another project to the Visual Studio solution, say a class library project, you can create an SDK style project by following these steps.
115
+
116
+
1. In Visual Studio, add the new project to your solution using a .NET or .NET Standard template. Do not target .NET Framework.
117
+
1. Edit the project file by right-clicking on the project name in Solution Explorer and select **Edit project file**, or simply open the project's .csproj file in a separate editor.
118
+
1. You should see the line `<Project Sdk="Microsoft.NET.Sdk">` in the project file. Change the TargetFramework property to be `<TargetFramework>net462</TargetFramework>` and save the file.
119
+
1. Verify your solution builds, and you're done.
120
+
89
121
### Don't depend on System.Text.Json
90
122
91
123
Because the Microsoft.CrmSdk.CoreAssemblies NuGet package has a [dependency](https://www.nuget.org/packages/Microsoft.CrmSdk.CoreAssemblies#dependencies-body-tab) on System.Text.Json, you're able to refer to [System.Text.Json](xref:System.Text.Json) types at design time. However, the System.Text.Json.dll file in the sandbox run-time can't be guaranteed to be the same version that you reference in your project. If you need to use `System.Text.Json`, you should use the dependent assembly feature and explicitly include it in your NuGet package.
Copy file name to clipboardExpand all lines: powerapps-docs/maker/canvas-apps/connections/connection-azure-sqldatabase.md
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -47,37 +47,41 @@ You can directly call SQL Server stored procedures from Power Fx by turning on t
47
47
48
48
1. Go to **Settings** > **Upcoming features** > **Preview**.
49
49
1. Search for _stored procedures_.
50
-
1. Turn on the preview switch as shown.
50
+
1. Turn on the preview switch as shown. (You will need to save and reopen the app.)
51
51
52
52
:::image type="content" source="media/connection-azure-sqldatabase/previewflag-call-sp-direct.png" alt-text="Screenshot that shows the SQL Server stored procedures toggle set to On.":::
53
53
54
-
When you add a SQL Server connection to your app, you can now add tables and views or stored procedures.
54
+
When you add a SQL Server connection to your app, you can now add tables and views or stored procedures. This feature also works with secure implicit connections.
55
55
56
56
:::image type="content" source="media/connection-azure-sqldatabase/tables-views-stored-proc-selector.png" alt-text="Screenshot that shows lists of tables, views, and stored procedures available to be added to your app.":::
57
57
58
58
If you don't immediately see your stored procedure, it's faster to search for it.
59
59
60
60
Once you select a stored procedure, a child node appears and you can designate the stored procedure as **Safe to use for galleries and tables**. If you check this option, you can assign your stored procedure as an **Items** property for galleries for tables to use in your app.
61
61
62
-
Enable this option only if:
62
+
Enable this option **only if**:
63
63
64
-
1. There are no side effects to calling this procedure on demand, multiple times, whenever Power Apps refreshes the control. When used with an **Items** property of a gallery or table, Power Apps calls the stored procedure whenever the system determines a refresh is needed. You can't control when the stored procedure is called.
65
-
2. The stored procedure returns less than the delegable limit (500/2000) of records. When a table or view is assigned to an **Items** property, Power Apps can control the paging and bring in 100 records at a time, when it needs it. Stored procedures are different and might be pageable through an argument to the stored procedure. But Power Apps can't bring in pages automatically like it can for tables and views. The author must configure pageability.
64
+
1. There are **no side effects** to calling this procedure on demand, multiple times, whenever Power Apps refreshes the control. When used with an **Items** property of a gallery or table, Power Apps calls the stored procedure whenever the system determines a refresh is needed. You can't control when the stored procedure is called.
65
+
2. The amount of data you return in the stored procedure is **modest**. Action calls, such as stored procedures, do not have a limit on the number of rows retrieved. They are not automatically paged in 100 record increments like tabular data sources (tables or views.) So, if the stored procedure returns a lot of data (many thousands of records) then your app may slow down or crash. For performance reasons you should bring in less than 2000 records.
66
66
67
67
### Example
68
68
69
69
When you add a stored procedure, you might see more than one data source in your project.
70
70
71
71
:::image type="content" source="media/connection-azure-sqldatabase/sqlserver-datasources.png" alt-text="Screenshot that shows SQL data sources.":::
72
72
73
-
Prefix the stored procedure name with the name of connector associated with it. For example, _DataCardValue3_1.Text_ is from the _DataCard_ connector.
73
+
To use a stored procedure in Power Apps, first prefix the stored procedure name with the name of connector associated with it and the name the stored procedure. 'Paruntimedb.dbonewlibrarybook' in the example illustrates this pattern. Note also that when Power Apps brings the stored procedure in, it concatenates the full name. So, 'dbo.newlibrarybook' becomes 'dbonewlibrarybook'.
74
74
75
-
Label the values, for example using a number, as necessary since you're reading from a text value in Power Apps.
75
+
Remember to convert values appropriately as you pass them into your stored procedure as necessary since you're reading from a text value in Power Apps. For example, if you are updating an integer in SQL you must convert the text in the field using 'Value()'.
> To use a stored procedure in an **Item** property for a gallery or table, use the stored procedure name where you'd use the table name.
80
+
> To use a stored procedure in an **Item** property for a gallery or table, use the stored procedure name where you'd use the table name. Views do not have primary keys so you will need to supply a key value for record specific operations. You can access the stored procedure after you declare it safe for the UI. Reference the data source name and the the name of the stored procedure followed by 'ResultSets'. You can access multiple results by indexing through list of tables returned.
title: Copilot answer modern control in Power Apps
3
+
description: Learn about the details, properties, and examples of the Copilot answer modern control in Power Apps.
4
+
author: yogeshgupta698
5
+
6
+
ms.topic: reference
7
+
ms.component: canvas
8
+
ms.date: 2/14/2024
9
+
ms.subservice: canvas-maker
10
+
ms.author: yogupt
11
+
ms.reviewer: mkaur
12
+
search.audienceType:
13
+
- maker
14
+
contributors:
15
+
- mduelae
16
+
- yogeshgupta698
17
+
18
+
---
19
+
# Copilot answer modern control in Power Apps (preview)
20
+
21
+
[This article is pre-release document and is subject to change.]
22
+
23
+
A control that makers can use to add predefined questions that end users can use to get generated answers.
24
+
25
+
## Description
26
+
27
+
Makers can use the Copilot answer control to set predefined questions that end users can use to get generative answers with a single click. The control is optimized for mobile users and is powered by Microsoft Copilot.
28
+
29
+
## Key properties
30
+
31
+
**Data source (Items)** – The Copilot answer control only supports Dataverse as the data source. The answer to the question comes from the Dataverse table that you select.
32
+
33
+
**Views** – A user can select any of the views that are available in the data source.
34
+
35
+
**Fields** - Default list of fields available for the table. Users can select **Edit** to see the list of fields. They can also add or modify the fields based on their requirements.
36
+
37
+
**Title** – A label that is displayed at the top of the Copilot answer control.
38
+
39
+
**Question for Copilot** – This is the question a maker asks the Copilot answer control. The question is used as the prompt to generate a response that is displayed by the answer control that's based on the selected **Data source** property.
40
+
41
+
42
+
## Additional properties
43
+
44
+
**Show answer** – Should the Copilot answer control answer a question when the user clicks on the ‘Arrow’ icon (After sending) or as soon as the control loads when the question is defined in the properties window (Immediate).
45
+
46
+
**DisplayMode** – Whether the control allows user input (Edit), only displays data (View), or is disabled (Disabled).
47
+
48
+
**Position** - Whether a control appears or is hidden.
49
+
50
+
**[X](../properties-size-___location.md)** – The distance between the left edge of a control and the left edge of its parent container (screen if no parent container).
51
+
52
+
**[Y](../properties-size-___location.md)** – The distance between the top edge of a control and the top edge of the parent container (screen if no parent container).
53
+
54
+
**[Size](../properties-text.md)** – The size of the control on the canvas
Copy file name to clipboardExpand all lines: powerapps-docs/maker/canvas-apps/controls/modern-controls/modern-controls-reference.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,8 @@ Configure the behavior of a modern control by setting one of its properties. Eac
31
31
32
32
**[Checkbox](modern-control-checkbox.md)** - Select or clear an option to specify **true** or **false**.
33
33
34
+
**[Copilot answer (preview)](modern-control-copilot-answer.md)** - A control that makers can use to add predefined questions that end users can use to get generated answers.
35
+
34
36
**[Date picker](modern-controls-date-picker.md)** - A control that the user can select to specify a date.
35
37
36
38
**[Dropdown](modern-control-dropdown.md)** – Select a value from the list of items.
title: Overivew of Copilot answer control for canvas apps
3
+
description: Use the Copilot answer control for canvas app.
4
+
author: mduelae
5
+
ms.topic: conceptual
6
+
ms.custom: canvas
7
+
ms.collection:
8
+
- bap-ai-copilot
9
+
- get started
10
+
ms.reviewer: mkaur
11
+
ms.date: 2/13/2024
12
+
ms.subservice: canvas-maker
13
+
ms.author: arijitba
14
+
search.audienceType:
15
+
- maker
16
+
contributors:
17
+
- mduelae
18
+
---
19
+
20
+
# Use Copilot answer control for canvas apps (preview)
21
+
22
+
[This article is prerelease documentation and is subject to change.]
23
+
24
+
Makers can use the Copilot answer control to set predefined questions that end users can use to get AI-generated information with a single click. The control is powered by Microsoft Copilot and is designed for mobile users to provide them with immediate answers to frequently asked questions.
25
+
26
+
:::image type="content" source="media/answer-control/answer-control-shown-on-mobile.png" alt-text="Answers shown on mobile":::
27
+
28
+
## Enable Copilot answer control for your environment
29
+
30
+
To use the Copilot answer control in a canvas app, an admin must first turn on the feature, **Allow canvas editors to insert the Copilot answer component, which allows users to receive an AI-powered answer to a predefined data query** in their environment.
31
+
32
+
This setting can be found in the [Power Platform admin center](https://admin.powerplatform.microsoft.com) by going to **Environments** > [select an environment] > **Settings** > **Product** > **Features**. For more information, see [Manage feature settings](/power-platform/admin/settings-features#copilot-preview).
33
+
34
+
:::image type="content" source="media/answer-control/answer-control-enable-by-admin.jpg" alt-text="Turn on Copilot answer control on Power Platform admin center":::
35
+
36
+
## Add Copilot answer control
37
+
38
+
With your [canvas app open for editing](edit-app.md) in Power Apps Studio:
39
+
40
+
1. On the command bar, select **Insert** and then select one of the following options:
1. When the **Copilot answer (preview)** control is added to the canvas app, select a data source from the pane. Copilot only supports Dataverse tables.
48
+
49
+
:::image type="content" source="media/answer-control/answer-control-select-data-type.png" alt-text="Select data source":::
50
+
51
+
1. On the control properties pane, select the **Properties** tab.
52
+
53
+
1. In the properties, enter the **Title**, **Questions for Copilot**, and **Show answer** for the question. You can also edit other control properties as needed.
54
+
55
+
:::image type="content" source="media/answer-control/answer-control-properties.png" alt-text="Answer control properties":::
56
+
57
+
1. When you're done, [save and publish](save-publish-app.md) your app.
58
+
59
+
## Use Copilot answer control
60
+
61
+
End users can regenerate responses and provide feedback on the quality of responses.
62
+
63
+
Follow these steps to see answers generated by the Copilot answer control:
64
+
65
+
1. Open a canvas app on Power Apps mobile and navigate to the Copilot answer control in your app.
66
+
1. On the Copilot answer control select, **Send**.
67
+
68
+
:::image type="content" source="media/answer-control/answer-control-send.png" alt-text="Use Copilot answer control on mobile":::
0 commit comments