Skip to content

Commit 9ff0767

Browse files
authored
Merge branch 'live' into patch-1
2 parents 369523d + 35f1a79 commit 9ff0767

File tree

351 files changed

+14717
-200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

351 files changed

+14717
-200
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"ExpandedNodes": [
3+
"",
4+
"\\control-framework",
5+
"\\control-framework\\manifest-schema-reference",
6+
"\\control-framework\\manifest-schema-reference\\includes",
7+
"\\control-framework\\reference",
8+
"\\control-framework\\reference\\client"
9+
],
10+
"SelectedNode": "\\control-framework\\reference\\client\\getclient.md",
11+
"PreviewInSolutionExplorer": false
12+
}
Binary file not shown.
220 KB
Binary file not shown.
Binary file not shown.

powerapps-docs/developer/common-data-service/org-service/early-bound-programming.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,26 @@ Which style you choose to use is up to you. The following table provides the adv
136136

137137
Because all the generated classes inherit from the <xref:Microsoft.Xrm.Sdk.Entity> class used with late-bound programming, you can work with entities, attributes, and relationships not defined within classes.
138138

139-
### Example
139+
### Examples
140+
141+
The following example shows one way to mix early and late binding methods using <xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceContext>.
142+
143+
```csharp
144+
// Create an organization service context object
145+
AWCServiceContext context = new AWCServiceContext(_serviceProxy);
146+
147+
// Instantiate an account object using the Entity class.
148+
Entity testaccount = new Entity("account");
149+
150+
// Set several attributes. For account, only the name is required.
151+
testaccount["name"] = "Fourth Coffee";
152+
testaccount["emailaddress1"] = "[email protected]";
153+
154+
// Save the entity using the organization service context object.
155+
context.AddToAccountSet(testaccount);
156+
context.SaveChanges();
157+
158+
```
140159

141160
If a custom attribute was not included in the generated classes, you can still use it.
142161

@@ -154,6 +173,17 @@ var account = new Account();
154173
Guid accountid = svc.Create(account);
155174
```
156175

176+
#### Assign an early bound instance to a late bound instance
177+
The following sample shows how to assign an early bound instance to a late bound instance.
178+
179+
```csharp
180+
Entity incident = ((Entity)context.InputParameters[ParameterName.Target]).ToEntity<Incident>();
181+
Task relatedEntity = new Task() { Id = this.TaskId };
182+
183+
incident.RelatedEntities[new Relationship("Incident_Tasks")] =
184+
new EntityCollection(new Entity[] { relatedEntity.ToEntity<Entity>() });
185+
```
186+
157187
### See also
158188

159189
[Entity Operations using the Organization service](entity-operations.md)<br />

powerapps-docs/developer/common-data-service/org-service/organizationservicecontext.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,17 @@ if (pam != null)
8585
Task firstTask = pam.Contact_Tasks.FirstOrDefault();
8686
}
8787
```
88+
### Use the AddLink method
89+
You can use the <xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceContext.AddLink(Microsoft.Xrm.Sdk.Entity,Microsoft.Xrm.Sdk.Relationship,Microsoft.Xrm.Sdk.Entity)> method to create associations. You must call the <xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceContext.SaveChanges> method before the server is updated with the new link information.
8890

91+
The following code example shows how to create an association between a contact and an account.
92+
93+
```csharp
94+
Relationship relationship = new Relationship("account_primary_contact");
95+
context.AddLink(contact, relationship, account);
96+
context.SaveChanges();
97+
```
98+
8999
<a name="save_changes"></a>
90100

91101
## Save changes
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: Add Custom Components to a field or entity | Microsoft Docs
3+
description: Process to import custom components
4+
keywords:
5+
ms.author: nabuthuk
6+
manager: kvivek
7+
ms.date: 04/23/2019
8+
ms.service: "powerapps"
9+
ms.suite: ""
10+
ms.tgt_pltfrm: ""
11+
ms.topic: "article"
12+
---
13+
14+
# Add custom components to a field or entity
15+
16+
Custom components let you transform fields that traditionally contain text into visualizations. Similarly, you can use custom components to transform datasets, such as a view, to display in a more visual rendering rather than a list of records. Custom components can appear as visualizations on forms, dashboards, views, and homepage grids.
17+
18+
## Add a custom component to a field
19+
20+
Following the steps in this procedure will change the default label and text box field of the **Budget Amount** field to the slider custom component on the Opportunity entity. You can use similar steps to replace an existing field with a custom component or configure a custom component for a custom field.
21+
22+
1. Open solution explorer.
23+
24+
2. Expand **Entities**, expand the entity that you want, such as the **Opportunity** entity, select **Forms**, and then open a form such as the **Main** form.
25+
26+
3. In the form editor, double-click the field where you want to add a custom component, such as the **Budget Amount** field on the opportunity main form. Alternatively, you can create a custom field.
27+
28+
4. On the **Field Properties** page, select the **Controls** tab, and then select **Add Control**.
29+
30+
5. On the Add Control page, select the component that you want, such as the **Linear Slider** component, and then select **Add**.
31+
32+
6. Choose the client where you want the component to appear.
33+
34+
- **Web**. To make the custom component available from any web browser, select the Web option next to the component. Notice that setting the Web option includes rendering the component in web browsers on PCs, Macs, and mobile devices.
35+
36+
- **Phone**. To make the custom component available on phones running Dynamics 365 for phones, select the Phone option next to the component.
37+
38+
- **Tablet**. To make the custom component available on tablet devices running Dynamics 365 for tablets, select the Tablet option next to the component.
39+
7. Select the pencil icon next to **Min**, **Max**, and **Step**, set the property option, and then select **OK**.
40+
41+
- **Min**. Set the minimum accepted value. You can bind a static value that you enter or bind the value to an existing field. In this example **Bind to static value** is **Currency** and the minimum value that can be entered is *zero*.
42+
43+
- **Bind to a static value**. Select the data type, such as a whole number (Whole.None), currency, floating point (FP), or decimal. Next, enter a number that represents the minimum accepted value for the field.
44+
45+
- **Bind to values on a field**. Select a field from the list that will be used as the minimum accepted value.
46+
47+
- **Max**. Set the maximum accepted value for the field. Similar to the Min value, you can bind a static value that you enter or bind the value to an existing field as described earlier. In this example, **Bind to static value** is **Currency** and the maximum value that can be entered is **1 billion**.
48+
49+
- **Step**. This represents the unit to increment or decrement when adding to or subtracting from the current value. For example, for budget amount you can select 100 dollar increments\decrements.
50+
51+
- **Hide Default Control**. Selecting this option hides the component so neither the component or the data is displayed in any of the clients that don't support the custom component.
52+
53+
8. Select **OK**, to close the Field Properties page.
54+
55+
9. To activate the customization, on the entity form select **Save**, and then select **Publish**.
56+
57+
10. Select **Save and Close** to close the form editor.
58+
59+
## Add custom component to an entity
60+
61+
To add a custom component like data-set component or simple table component to a grid or view, follow the steps below:
62+
63+
- Navigate to **Settings > Customizations** and click on **Customize the System**.
64+
- Click on the arrow next to **Entities** tab a select the entity you want to add the custom component.
65+
- Click on the **Controls** tab and click on **Add a control**.
66+
- On the Add Control page, select the component that you want, such as Simple Table component and then select **Add**.
67+
- Choose the client where you want the component to appear.
68+
69+
70+
## See the custom component in action
71+
72+
Open a record that includes the field with the custom component, such as the Opportunity form from the previous example, and view how the field is changed. The field is now rendered as a slider component instead of the text field.
73+
74+
### See also
75+
76+
[Implementing components in TypeScript](implementing-controls-using-typescript.md)<br/>
77+
[PowerApps component framework API Reference](reference/index.md)<br/>
78+
[PowerApps component framework Overview](overview.md)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Component implementation library | Microsoft Docs
3+
description: Create custom components using JavaScript or TypeScript
4+
keywords:
5+
ms.author: nabuthuk
6+
manager: kvivek
7+
ms.date: 04/23/2019
8+
ms.service: "powerapps"
9+
ms.suite: ""
10+
ms.tgt_pltfrm: ""
11+
ms.topic: "article"
12+
ms.assetid: 5d100dc3-bd82-4b45-964c-d90eaebc0735
13+
---
14+
15+
Implementing the component library is one of the key step when you are developing custom components using PowerApps component framework. Developers can implement component library using TypeScript. Each custom component must have a library that includes the definition of a function which returns an object that implements the methods described in the custom component interface.
16+
17+
The object implements the following methods:
18+
19+
- [init](reference/control/init.md) (Required)
20+
- [updateView](reference/control/updateview.md) (Required)
21+
- [getOutputs](reference/control/getoutputs.md) (Optional)
22+
- [destroy](reference/control/destroy.md) (Required)
23+
24+
These methods controls the lifecycle of the custom component.
25+

0 commit comments

Comments
 (0)