Skip to content

Commit d67328e

Browse files
authored
Merge pull request #1072 from MicrosoftDocs/master
edupont04 from OPS portal: Merge from master to live
2 parents 88e4b30 + 4f5d8b5 commit d67328e

21 files changed

+632
-361
lines changed

business-central/TOC.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,17 @@
369369
#### [Business Central Extensions by Other Providers](ui-extensions-other.md)
370370
## Integrating with Dynamics 365 Sales
371371
### [Overview](admin-prepare-dynamics-365-for-sales-for-integration.md)
372-
### [Setting Up User Accounts for Integrating with Dynamics 365 Sales](admin-setting-up-integration-with-dynamics-sales.md)
373-
### [Set Up a Dynamics 365 Sales Connection](admin-how-to-set-up-a-dynamics-crm-connection.md)
374-
### [Synchronizing Business Central and Dynamics 365 Sales](admin-synchronizing-business-central-and-sales.md)
372+
## Integrating with Common Data Service
373+
### [Overview](admin-common-data-service.md)
374+
### [Data Ownership Models](admin-cds-company-concept.md)
375+
### [Setting Up User Accounts for Integrating with Common Data Service](admin-setting-up-integration-with-dynamics-sales.md)
376+
### [Connect to Common Data Service](admin-how-to-set-up-a-dynamics-crm-connection.md)
377+
### [Synchronizing Business Central and Common Data Service](admin-synchronizing-business-central-and-sales.md)
375378
### [Mapping the Tables and Fields to Synchronize](admin-how-to-modify-table-mappings-for-synchronization.md)
376379
### [Manually Synchronize Table Mappings](admin-manual-synchronization-of-table-mappings.md)
377380
### [Schedule a Synchronization](admin-scheduled-synchronization-using-the-synchronization-job-queue-entries.md)
378381
### [Troubleshooting Synchronization Errors](admin-troubleshoot-sales-synchronization.md)
382+
<!-- ### [Developer Walkthrough: Custom Integration with Common Data Service](admin-walkthrough-customizing-cds-integration.md) moved to devitpro -->
379383

380384
# Finance
381385
## [Overview](finance.md)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: Company and Business Unit Mapping | Microsoft Docs
3+
description: Companies are both a legal and business constructs, and they are used to secure and visualize business data.
4+
author: bholtorf
5+
6+
ms.service: dynamics365-business-central
7+
ms.topic: article
8+
ms.devlang: na
9+
ms.tgt_pltfrm: na
10+
ms.workload: na
11+
ms.search.keywords: CDS, Common Data Service, integration, sync
12+
ms.date: 01/17/2020
13+
ms.author: bholtorf
14+
15+
---
16+
17+
# Data Ownership Models
18+
[!INCLUDE[d365fin](includes/cds_long_md.md)] requires that you specify an owner for the data you store. For more information, see [Entity ownership](https://docs.microsoft.com/powerapps/maker/common-data-service/types-of-entities#entity-ownership) in the Power Apps documentation. When you set up integration between [!INCLUDE[d365fin](includes/cds_long_md.md)] and [!INCLUDE[d365fin](includes/d365fin_md.md)] you must choose one of two ownership models for records that are synchronized:
19+
20+
* Team
21+
* Person (user)
22+
23+
Actions that can be performed on these records can be controlled on a user level. For more information, see [User and team entities](https://docs.microsoft.com/powerapps/developer/common-data-service/user-team-entities). We recommend the Team ownership model because it makes it easier to manage ownership for multiple people.
24+
25+
## Team Ownership
26+
In [!INCLUDE[d365fin](includes/d365fin_md.md)], a company is a legal and business entity that offers ways to secure and visualize business data. Users always work in the context of a company. The closest that [!INCLUDE[d365fin](includes/cds_long_md.md)] comes to this concept is the business unit entity, which does not have legal or business implications.
27+
28+
Because business units lack legal and business implications, you cannot force a one-to-one (1:1) mapping to synchronize data between a company and a business unit, either one-way or bi-directional. To make synchronization possible, when you enable synchronization for a company in [!INCLUDE[d365fin](includes/d365fin_md.md)], the following happens in [!INCLUDE[d365fin](includes/cds_long_md.md)]:
29+
30+
* We create a company entity that is equivalent to the company entity in [!INCLUDE[d365fin](includes/d365fin_md.md)]. The name of the company is suffixed with "BC Company ID." For example, Cronus International Ltd. (93555b1a-af3e-ea11-bb35-000d3a492db1).
31+
* We create a default business unit that has the same name as the company. For example, Cronus International Ltd. (93555b1a-af3e-ea11-bb35-000d3a492db1).
32+
* We create separate owner team with the same name as the company and associate it with the business unit. The name of the team is prefixed with "BCI -." For example, BCI - Cronus International Ltd. (93555b1a-af3e-ea11-bb35-000d3a492db1).
33+
* Records that are created and synchronized to [!INCLUDE[d365fin](includes/cds_long_md.md)] are assigned to the "BCI Owner" team that is linked to the business unit.
34+
35+
The following image shows an example of this data setup in [!INCLUDE[d365fin](includes/cds_long_md.md)].
36+
37+
![The root business unit is on top, the teams are in the center, and then the companies are at the bottom.](media/cds_bu_team_company.png)
38+
39+
In this configuration, records that are related to the Cronus US company will be owned by a team that is linked to the Cronus US <ID> business unit in [!INCLUDE[d365fin](includes/cds_long_md.md)]. Users who can access that business unit through a security role that is set to business unit–level visibility in [!INCLUDE[d365fin](includes/cds_long_md.md)] can now see those records. The following example shows how to use teams to provide access to those records.
40+
41+
* The Sales Manager role is assigned to members of the Cronus US Sales team.
42+
* Users who have the Sales Manager role can access account records for members of the same business unit.
43+
* The Cronus US Sales team is linked to the Cronus US business unit that was mentioned earlier. Members of the Cronus US Sales team can see any account that is owned by the Cronus US <ID> user, which would have come from the Cronus US company entity in [!INCLUDE[d365fin](includes/d365fin_md.md)].
44+
45+
However, the 1:1 mapping between business unit, company, and team is just a starting point, as shown in the following image.
46+
47+
![The security role controls data visibility.](media/cds_bu_team_company_2.png)
48+
49+
In this example, a new EUR (Europe) root business unit is created in [!INCLUDE[d365fin](includes/cds_long_md.md)] as the parent for both Cronus DE (Gernamy) and Cronus ES (Spain). The EUR business unit is not related to synchronization. However, it can give members of the EUR Sales team access to account data in both Cronus DE and Cronus ES by setting the data visibility to **Parent/Child BU** on the associated security role in [!INCLUDE[d365fin](includes/cds_long_md.md)].
50+
51+
Synchronization determines which team should own records. This is controlled by the **Default owning team** field on the BCI - <ID> record. When a BCI - <ID> record is enabled for synchronization we automatically create the associated business unit and owner team (if it doesn't already exist), and set the **Default owning team** field. When synchronization is enabled for an entity, administrators can change the owning team, but a team must always be assigned.
52+
53+
> [!NOTE]
54+
> Records become read-only after a company is added and saved, so be sure to choose the correct company.
55+
56+
### Choosing a different business unit
57+
You can change the business unit selection. If you choose another unit, for example, one that you created earlier in CDS it will keep its original name. That is, it will not be suffixed with the company ID. We will create a team that does use the naming convention.
58+
59+
## Person Ownership
60+
If you choose the Person ownership model you must specify each salesperson who will own new records. The business unit and team are created as described in the previous section.
61+
62+
## See Also
63+
[About [!INCLUDE[d365fin](includes/cds_long_md.md)]](admin-common-data-service.md)
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
title: "Handling Missing Option Values"
3+
description: Learn how to prevent full synchronization from failing because the options differ in mapped fields.
4+
author: bholtorf
5+
6+
ms.author: bholtorf
7+
ms.custom: na
8+
ms.reviewer: na
9+
ms.service: dynamics365-business-central
10+
ms.topic: article
11+
ms.date: 02/03/2020
12+
---
13+
14+
# Handling Missing Option Values
15+
[!INCLUDE[d365fin](includes/cds_long_md.md)] contains only three option set fields that contain option values that you can map to [!INCLUDE[d365fin](includes/d365fin_md.md)] fields of Option type<!-- Option type, not enum? @Onat can you vertify this? --> for automatic synchronization. During synchronization, non-mapped options are ignored and the missing options are appended to the related [!INCLUDE[d365fin](includes/d365fin_md.md)] table and added to the **CDS Option Mapping** system table to handle manually later. For example, by adding the missing options in either product and then updating the mapping. This section describes how that works.
16+
17+
The **Integration Table Mapping** page contains three maps for fields that contain one or more mapped option values. After a full synchronization, the **CDS Option Mapping** page contains the non-mapped options in the three fields respectively.
18+
19+
| Record | Option Value | Option Value Caption |
20+
|----------------------------|--------------|----------------------|
21+
| Payment Terms: NET30 | 1 | Net 30 |
22+
| Payment Terms: 2%10NET30 | 2 | 2% 10; Net 30 |
23+
| Payment Terms: NET45 | 3 | Net 45 |
24+
| Payment Terms: NET60 | 4 | Net 60 |
25+
| Shipment Method: FOB | 1 | FOB |
26+
| Shipment Method: NOCHARGE | 2 | No Charge |
27+
| Shipping Agent: AIRBORNE | 1 | Airborne |
28+
| Shipping Agent: DHL | 2 | DHL |
29+
| Shipping Agent: FEDEX | 3 | FedEx |
30+
| Shipping Agent: UPS | 4 | UPS |
31+
| Shipping Agent: POSTALMAIL | 5 | Postal Mail |
32+
| Shipping Agent: FULLLOAD | 6 | Full Load |
33+
| Shipping Agent: WILLCALL | 7 | Will Call |
34+
35+
The content of the **CDS Option Mapping** page is based on enum values in the **CDS Account** table. In [!INCLUDE[d365fin](includes/cds_long_md.md)], the following fields on the account entity are mapped to fields on the customer and vendor records:
36+
37+
- **Address 1: Freight Terms** of data type Enum, where values are defined as follow:
38+
39+
```
40+
enum 5335 "CDS Shipment Method Code"
41+
{
42+
Extensible = true;
43+
value(0; " ") { Caption = ' '; }
44+
value(1; "FOB") { Caption = 'FOB'; }
45+
value(2; "NoCharge") { Caption = 'No Charge'; }
46+
}
47+
```
48+
49+
- **Address 1: Shipping Method** of data type Enum, where values are defined as follows:
50+
51+
```
52+
enum 5336 "CDS Shipping Agent Code"
53+
enum 5336 "CDS Shipping Agent Code"
54+
{
55+
Extensible = true;
56+
value(0; " ") { Caption = ' '; }
57+
value(1; "Airborne") { Caption = 'Airborne'; }
58+
value(2; "DHL") { Caption = 'DHL'; }
59+
value(3; "FedEx") { Caption = 'FedEx'; }
60+
value(4; "UPS") { Caption = 'UPS'; }
61+
value(5; "PostalMail") { Caption = 'Postal Mail'; }
62+
value(6; "FullLoad") { Caption = 'Full Load'; }
63+
value(7; "WillCall") { Caption = 'Will Call'; }
64+
}
65+
```
66+
67+
- **Payment Terms** of data type Enum, where values are defined as follows:
68+
69+
```
70+
enum 5334 "CDS Payment Terms Code"
71+
{
72+
Extensible = true;
73+
value(0; " ") { Caption = ' '; }
74+
value(1; "Net30") { Caption = 'Net 30'; }
75+
value(2; "2%10Net30") { Caption = '2% 10; Net 30'; }
76+
value(3; "Net45") { Caption = 'Net 45'; }
77+
value(4; "Net60") { Caption = 'Net 60'; }
78+
}
79+
```
80+
81+
All of the [!INCLUDE[d365fin](includes/d365fin_md.md)] enums above are mapped to option sets in [!INCLUDE[d365fin](includes/cds_long_md.md)].
82+
83+
### Extending Option Sets in [!INCLUDE[d365fin](includes/d365fin_md.md)]
84+
1. Create a new AL extension.
85+
86+
2. Add an Enum extension for the options that you want to extend. Be sure that you use the same value.
87+
88+
```
89+
enumextension 50100 "CDS Payment Terms Code Extension" extends "CDS Payment Terms Code"
90+
{
91+
value(779800001; "Cash Payment") { Caption = 'Cash Payment'; }
92+
value(779800002; "Transfer") { Caption = 'Transfer'; }
93+
}
94+
```
95+
96+
> [!IMPORTANT]
97+
> You must use the same option ID values from [!INCLUDE[d365fin](includes/cds_long_md.md)] when you extend the [!INCLUDE[d365fin](includes/d365fin_md.md)] enum. Otherwise synchronization will fail.
98+
99+
> [!NOTE]
100+
> The first ten characters of the new option value names and captions must be unique. For example, two options named "Transfer 20 working days" and "Transfer 20 calendar days" will cause an error because both have the same first 10 characters, "Transfer 2". Name them, for example, "TRF20 WD" and "TRF20 CD."
101+
102+
### Update [!INCLUDE[d365fin](includes/cds_long_md.md)] Option Mapping
103+
Now you can recreate the mapping between [!INCLUDE[d365fin](includes/cds_long_md.md)] options and [!INCLUDE[d365fin](includes/d365fin_md.md)] records.
104+
105+
On the **Integration Table Mapping** page, choose the line for the **Payment Terms** map, and then choose the **Synchronize Modified Records** action. The **CDS Option Mapping** page is updated with the additional records below.
106+
107+
| Record | Option Value | Option Value Caption |
108+
|--------------------------------|----------------|----------------------|
109+
| Payment Terms: NET30 | 1 | Net 30 |
110+
| Payment Terms: 2%10NET30 | 2 | 2% 10; Net 30 |
111+
| Payment Terms: NET45 | 3 | Net 45 |
112+
| Payment Terms: NET60 | 4 | Net 60 |
113+
| **Payment Terms: CASH PAYME** | **779800001** | **Cash Payment** |
114+
| **Payment Terms: TRANSFER** | **779800002** | **Transfer** |
115+
116+
The **Payment Terms** table in [!INCLUDE[d365fin](includes/d365fin_md.md)] will then have new records for the [!INCLUDE[d365fin](includes/cds_long_md.md)] options. In the following table new options are in bold font . Italic rows represent all options that can now be synchronized. Remaining rows represent options are not in use and will be ignored during synchronization. You can remove them or extend CDS options with the same names.)
117+
118+
| Code | Due Date Calculation | Discount Date Calculation | Discount % | Calc. Pmt. Disc. on Cr. Memos | Description |
119+
|------------|----------------------|---------------------------|------------|-------------------------------|-------------------|
120+
| 10 DAYS | 10D | | 0. | FALSE | Net 10 days |
121+
| 14 DAYS | 14D | | 0. | FALSE | Net 14 days |
122+
| 15 DAYS | 15D | | 0. | FALSE | Net 15 days |
123+
| 1M(8D) | 1M | 8D | 2. | FALSE | 1 Month/2% 8 days |
124+
| 2 DAYS | 2D | | 0. | FALSE | Net 2 days |
125+
| *2%10NET30* | | | 0. | FALSE | |
126+
| 21 DAYS | 21D | | 0. | FALSE | Net 21 days |
127+
| 30 DAYS | 30D | | 0. | FALSE | Net 30 days |
128+
| 60 DAYS | 60D | | 0. | FALSE | Net 60 days |
129+
| 7 DAYS | 7D | | 0. | FALSE | Net 7 days |
130+
| ***CASH PAYME*** | | | 0. | FALSE | |
131+
| CM | CM | | 0. | FALSE | Current Month |
132+
| COD | 0D | | 0. | FALSE | Cash on delivery |
133+
| *NET30* | | | 0. | FALSE | |
134+
| *NET45* | | | 0. | FALSE | |
135+
| *NET60* | | | 0. | FALSE | |
136+
| ***TRANSFER*** | | | 0. | FALSE | |
137+
138+
## See Also

0 commit comments

Comments
 (0)