|
1 |
| ---- |
2 |
| -title: "Create and edit One-to-many or Many-to-one entity relationships using Power Apps portal | MicrosoftDocs" |
3 |
| -description: "Learn how to create one-to-many or many-to-one entity relationships using Power Apps portal" |
4 |
| -ms.custom: "" |
5 |
| -ms.date: 06/11/2018 |
6 |
| -ms.reviewer: "" |
7 |
| -ms.service: powerapps |
8 |
| -ms.suite: "" |
9 |
| -ms.tgt_pltfrm: "" |
10 |
| -ms.topic: "article" |
11 |
| -applies_to: |
12 |
| - - "Dynamics 365 (online)" |
13 |
| - - "Dynamics 365 Version 9.x" |
14 |
| - - "powerapps" |
15 |
| -author: "Mattp123" |
16 |
| -ms.author: "matp" |
17 |
| -manager: "kvivek" |
18 |
| -search.audienceType: |
19 |
| - - maker |
20 |
| -search.app: |
21 |
| - - PowerApps |
22 |
| - - D365CE |
23 |
| ---- |
24 |
| -# Create and edit One-to-many or Many-to-one entity relationships using Power Apps portal |
25 |
| - |
26 |
| -The [Power Apps portal](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc) provides an easy way to create and edit 1:N (one-to-many) or N:1 (many-to-one) relationships for Common Data Service. |
27 |
| - |
28 |
| -The portal enables configuring the most common options, but certain options can only be set using solution explorer. More information: |
29 |
| -- [Create and edit 1:N (one-to-many) or N:1 (many-to-one) relationships](create-edit-1n-relationships.md) |
30 |
| -- [Create and edit 1:N (one-to-many) or N:1 (many-to-one) entity relationships using solution explorer](create-edit-1n-relationships-solution-explorer.md). |
31 |
| - |
32 |
| -## View entity relationships |
33 |
| - |
34 |
| -1. From the [Power Apps portal](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc), select either **Model-driven** or **Canvas** design mode. |
35 |
| -2. Select **Data** > **Entities** and select the entity that has the relationships you want to view. |
36 |
| -3. With the **Relationships** tab selected, you can select the following views: |
37 |
| - |
38 |
| - |View|Description| |
39 |
| - |--|--| |
40 |
| - |**All**| Shows all the relationships for the entity| |
41 |
| - |**Custom**|Shows only custom relationships for the entity| |
42 |
| - |**Default**|Shows only the standard relationships for the entity| |
43 |
| -<!-- TODO: What is the actual difference between All and Default? --> |
44 |
| - |
45 |
| - |
46 |
| - |
47 |
| -## Create relationships |
48 |
| - |
49 |
| -While [viewing entity relationships](#view-entity-relationships), in the command bar, select **Add relationship** and choose either **Many-to-one** or **One-to-many**. |
50 |
| - |
51 |
| - |
52 |
| - |
53 |
| -> [!NOTE] |
54 |
| -> For information about **Many-to-many** relationships see [Create N:N (many-to-many) relationships](create-edit-nn-relationships.md) |
55 |
| -
|
56 |
| -<!-- This may change going forward, but this is the way it is now. #2534972 --> |
57 |
| -> [!Important] |
58 |
| -> The portal uses different terminology than solution explorer. The solution explorer **Primary entity** is the **Current entity** in the portal. |
59 |
| -
|
60 |
| -Depending on your choice you will see either: |
61 |
| - |
62 |
| -<!-- These are the correct screenshots from the UI as of 6/11/18 --> |
63 |
| -|Type|Panel| |
64 |
| -|--|--| |
65 |
| -|**Many-to-one**|| |
66 |
| -|**One-to-many**|| |
67 |
| - |
68 |
| -Choose the **Related entity** for the relationship you want to create between the two entities. |
69 |
| - |
70 |
| -> [!NOTE] |
71 |
| -> With either choice, a lookup field will be created on the *current* entity. |
72 |
| -
|
73 |
| -Once you select the entity you can edit the details of the relationship. In this example, multiple contact entity records can be associated with a single account. |
74 |
| - |
75 |
| -<!-- These are the correct screenshots from the UI as of 6/11/18 --> |
76 |
| - |
77 |
| - |
78 |
| -You can edit the default values provided before you save. Select **More options** to view the **Relationship name** and **Lookup field description** values |
79 |
| - |
80 |
| -|Field|Description| |
81 |
| -|--|--| |
82 |
| -|**Lookup field display name**|The localizable text for the lookup field that will be created on the related entity.<br />This can be edited later.| |
83 |
| -|**Lookup field name**|The name for the Lookup field that will be created on the related entity.| |
84 |
| -|**Relationship name**|The name for the relationship that will be created.| |
85 |
| -|**Lookup field description**|The description for the lookup field. In model-driven apps this will appear as a tooltip when people hover their mouse over the field. <br />This can be edited later.| |
86 |
| - |
87 |
| -You can continue editing the entity. Select **Save Entity** to create the relationship you have configured. |
88 |
| - |
89 |
| -## Edit relationships |
90 |
| - |
91 |
| -While [viewing entity relationships](#view-entity-relationships), select the relationship you want to edit. |
92 |
| - |
93 |
| -> [!NOTE] |
94 |
| -> Each relationship can be found within the primary entity or the related entity as a **Many-to-one** or **One-to-many** relationship. Although it can be edited in either place, it is the same relationship. |
95 |
| -> |
96 |
| -> The publisher of a managed solution can prevent some customizations of relationships that are part of their solution. |
97 |
| -
|
98 |
| -The only fields you can edit are **Lookup field display name** and **Lookup field description**. These can also be edited in the properties of the lookup field in the related entity. More information: [Edit a field](create-edit-field-portal.md#edit-a-field) |
99 |
| - |
100 |
| -## Delete relationships |
101 |
| - |
102 |
| -While [viewing entity relationships](#view-entity-relationships), select the relationship you want to delete. |
103 |
| - |
104 |
| - |
105 |
| - |
106 |
| -You can use the **Delete relationship** command from the command bar or from the row context menu when you click the ellipses (**...**). |
107 |
| - |
108 |
| -Deleting the relationship will delete the lookup field on the related entity. |
109 |
| - |
110 |
| -> [!NOTE] |
111 |
| -> You will not be able to delete a relationship that has dependencies. For example, if you have added the lookup field to a form for the related entity, you must remove the field from the form before you delete the relationship. |
112 |
| -
|
113 |
| -### See also |
114 |
| - |
115 |
| -[Create and edit relationships between entities](create-edit-entity-relationships.md)<br /> |
116 |
| -[Create and edit 1:N (one-to-many) or N:1 (many-to-one) relationships](create-edit-1n-relationships.md)<br /> |
117 |
| -[Create and edit 1:N (one-to-many) or N:1 (many-to-one) entity relationships using solution explorer](create-edit-1n-relationships-solution-explorer.md)<br /> |
118 |
| -[Edit a field](create-edit-field-portal.md#edit-a-field) |
| 1 | +--- |
| 2 | +title: "Create and edit One-to-many or Many-to-one entity relationships using Power Apps portal | MicrosoftDocs" |
| 3 | +description: "Learn how to create one-to-many or many-to-one entity relationships using Power Apps portal" |
| 4 | +ms.custom: "" |
| 5 | +ms.date: 06/11/2018 |
| 6 | +ms.reviewer: "" |
| 7 | +ms.service: powerapps |
| 8 | +ms.suite: "" |
| 9 | +ms.tgt_pltfrm: "" |
| 10 | +ms.topic: "article" |
| 11 | +applies_to: |
| 12 | + - "Dynamics 365 (online)" |
| 13 | + - "Dynamics 365 Version 9.x" |
| 14 | + - "powerapps" |
| 15 | +author: "Mattp123" |
| 16 | +ms.author: "matp" |
| 17 | +manager: "kvivek" |
| 18 | +search.audienceType: |
| 19 | + - maker |
| 20 | +search.app: |
| 21 | + - PowerApps |
| 22 | + - D365CE |
| 23 | +--- |
| 24 | +# Create and edit One-to-many or Many-to-one entity relationships using Power Apps portal |
| 25 | + |
| 26 | +The [Power Apps portal](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc) provides an easy way to create and edit 1:N (one-to-many) or N:1 (many-to-one) relationships for Common Data Service. |
| 27 | + |
| 28 | +The portal enables configuring the most common options, but certain options can only be set using solution explorer. More information: |
| 29 | +- [Create and edit 1:N (one-to-many) or N:1 (many-to-one) relationships](create-edit-1n-relationships.md) |
| 30 | +- [Create and edit 1:N (one-to-many) or N:1 (many-to-one) entity relationships using solution explorer](create-edit-1n-relationships-solution-explorer.md). |
| 31 | + |
| 32 | +## View entity relationships |
| 33 | + |
| 34 | +1. From the [Power Apps portal](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc), select either **Model-driven** or **Canvas** design mode. |
| 35 | +2. Select **Data** > **Entities** and select the entity that has the relationships you want to view. |
| 36 | +3. With the **Relationships** tab selected, you can select the following views: |
| 37 | + |
| 38 | + |View|Description| |
| 39 | + |--|--| |
| 40 | + |**All**| Shows all the relationships for the entity| |
| 41 | + |**Custom**|Shows only custom relationships for the entity| |
| 42 | + |**Default**|Shows only the standard relationships for the entity| |
| 43 | +<!-- TODO: What is the actual difference between All and Default? --> |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | +## Create relationships |
| 48 | + |
| 49 | +While [viewing entity relationships](#view-entity-relationships), in the command bar, select **Add relationship** and choose either **Many-to-one** or **One-to-many**. |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +> [!NOTE] |
| 54 | +> For information about **Many-to-many** relationships see [Create N:N (many-to-many) relationships](create-edit-nn-relationships.md) |
| 55 | +
|
| 56 | +<!-- This may change going forward, but this is the way it is now. #2534972 --> |
| 57 | +> [!Important] |
| 58 | +> The portal uses different terminology than solution explorer. The solution explorer **Primary entity** is the **Current entity** in the portal. |
| 59 | +
|
| 60 | +Depending on your choice you will see either: |
| 61 | + |
| 62 | +<!-- These are the correct screenshots from the UI as of 6/11/18 --> |
| 63 | +|Type|Panel| |
| 64 | +|--|--| |
| 65 | +|**Many-to-one**|| |
| 66 | +|**One-to-many**|| |
| 67 | + |
| 68 | +Choose the **Related entity** for the relationship you want to create between the two entities. |
| 69 | + |
| 70 | +> [!NOTE] |
| 71 | +> With either choice, a lookup field will be created on the *current* entity. |
| 72 | +
|
| 73 | +Once you select the entity you can edit the details of the relationship. In this example, multiple contact entity records can be associated with a single account. |
| 74 | + |
| 75 | +<!-- These are the correct screenshots from the UI as of 6/11/18 --> |
| 76 | + |
| 77 | + |
| 78 | +You can edit the default values provided before you save. Select **More options** to view the **Relationship name** and **Lookup field description** values |
| 79 | + |
| 80 | +|Field|Description| |
| 81 | +|--|--| |
| 82 | +|**Lookup field display name**|The localizable text for the lookup field that will be created on the related entity.<br />This can be edited later.| |
| 83 | +|**Lookup field name**|The name for the Lookup field that will be created on the related entity.| |
| 84 | +|**Relationship name**|The name for the relationship that will be created.| |
| 85 | +|**Lookup field description**|The description for the lookup field. In model-driven apps this will appear as a tooltip when people hover their mouse over the field. <br />This can be edited later.| |
| 86 | + |
| 87 | +You can continue editing the entity. Select **Save Entity** to create the relationship you have configured. |
| 88 | + |
| 89 | +## Edit relationships |
| 90 | + |
| 91 | +While [viewing entity relationships](#view-entity-relationships), select the relationship you want to edit. |
| 92 | + |
| 93 | +> [!NOTE] |
| 94 | +> Each relationship can be found within the primary entity or the related entity as a **Many-to-one** or **One-to-many** relationship. Although it can be edited in either place, it is the same relationship. |
| 95 | +> |
| 96 | +> The publisher of a managed solution can prevent some customizations of relationships that are part of their solution. |
| 97 | +
|
| 98 | +The only fields you can edit are **Lookup field display name** and **Lookup field description**. These can also be edited in the properties of the lookup field in the related entity. More information: [Edit a field](create-edit-field-portal.md#edit-a-field) |
| 99 | + |
| 100 | +## Delete relationships |
| 101 | + |
| 102 | +While [viewing entity relationships](#view-entity-relationships), select the relationship you want to delete. |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | +You can use the **Delete relationship** command from the command bar or from the row context menu when you click the ellipses (**...**). |
| 107 | + |
| 108 | +Deleting the relationship will delete the lookup field on the related entity. |
| 109 | + |
| 110 | +> [!NOTE] |
| 111 | +> You will not be able to delete a relationship that has dependencies. For example, if you have added the lookup field to a form for the related entity, you must remove the field from the form before you delete the relationship. |
| 112 | +
|
| 113 | +### See also |
| 114 | + |
| 115 | +[Create and edit relationships between entities](create-edit-entity-relationships.md)<br /> |
| 116 | +[Create and edit 1:N (one-to-many) or N:1 (many-to-one) relationships](create-edit-1n-relationships.md)<br /> |
| 117 | +[Create and edit 1:N (one-to-many) or N:1 (many-to-one) entity relationships using solution explorer](create-edit-1n-relationships-solution-explorer.md)<br /> |
| 118 | +[Edit a field](create-edit-field-portal.md#edit-a-field) |
0 commit comments