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: articles/data-factory/connector-dynamics-crm-office-365.md
+36-2Lines changed: 36 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ To use this connector with Microsoft Entra service principal authentication, you
81
81
82
82
Use the following steps to create a linked service to Dynamics 365 in the Azure portal UI.
83
83
84
-
1. Browse to the Manage tab in your Azure Data Factory or Synapse workspace and select Linked Services, then select New:
84
+
1. Browse to the **Manage** tab in your Azure Data Factory or Synapse workspace and select Linked Services, then select **New**:
85
85
86
86
# [Azure Data Factory](#tab/data-factory)
87
87
@@ -502,6 +502,8 @@ Configure the corresponding interim data type in a dataset structure that is bas
502
502
503
503
To write data into a lookup field with multiple targets like Customer and Owner, follow this guidance and example:
504
504
505
+
# [Azure Data Factory](#tab/data-factory)
506
+
505
507
1. Make your source contains both the field value and the corresponding target entity name.
506
508
- If all records map to the same target entity, ensure one of the following conditions:
507
509
- Your source data has a column that stores the target entity name.
@@ -510,6 +512,18 @@ To write data into a lookup field with multiple targets like Customer and Owner,
510
512
511
513
1. Map both the value and entity-reference columns from source to sink. The entity-reference column must be mapped to a virtual column with the special naming pattern `{lookup_field_name}@EntityReference`. The column doesn't actually exist in Dynamics. It's used to indicate this column is the metadata column of the given multitarget lookup field.
512
514
515
+
# [Azure Synapse](#tab/synapse-analytics)
516
+
517
+
1. Make your source contains both the field value and the corresponding target entity schema name.
518
+
- If all records map to the same target entity, ensure one of the following conditions:
519
+
- Your source data has a column that stores the target entity schema name.
520
+
- You've added an additional column in the copy activity source to define the target entity.
521
+
- If different records map to different target entities, make sure your source data has a column that stores the corresponding target entity name.
522
+
523
+
1. Map both the value and entity-reference columns from source to sink. The entity-reference column must be mapped to a virtual column with the special naming pattern `{lookup_field_name}@EntityReference`. The column doesn't actually exist in Dynamics. It's used to indicate this column is the metadata column of the given multitarget lookup field.
524
+
525
+
---
526
+
513
527
### Setting the Owner field
514
528
515
529
When setting the Owner field in Dynamics 365 (Microsoft Dataverse) or Dynamics CRM, it's important to provide a valid reference. The valid options for the `@EntityReference` are:
@@ -533,14 +547,16 @@ In copy-activity column mapping, map the two columns as follows:
If all of your source records map to the same target entity and your source data doesn't contain the target entity name, here's a shortcut: in the copy activity source, add another column. Name the new column by using the pattern `{lookup_field_name}@EntityReference`, set the value to the target entity name, then proceed with column mapping as usual. If your source and sink column names are identical, you can also skip explicit column mapping because copy activity by default maps columns by name.
550
+
If all of your source records map to the same target entity and your source data doesn't contain the target entity schema name, here's a shortcut: in the copy activity source, add another column. Name the new column by using the pattern `{lookup_field_name}@EntityReference`, set the value to the target entity name, then proceed with column mapping as usual. If your source and sink column names are identical, you can also skip explicit column mapping because copy activity by default maps columns by name.
537
551
538
552
:::image type="content" source="./media/connector-dynamics-crm-office-365/connector-dynamics-add-entity-reference-column.png" alt-text="Dynamics lookup-field adding an entity-reference column":::
539
553
540
554
## Writing data to a lookup field via alternative keys
541
555
542
556
To write data into a lookup field using alternate key columns, follow this guidance and example:
543
557
558
+
# [Azure Data Factory](#tab/data-factory)
559
+
544
560
1. Ensure your source contains all the lookup key columns.
545
561
546
562
2. The alternate key columns must be mapped to the column with the special naming pattern `{lookup_field_name}@{alternate_key_column_name}`. The column doesn't exist in Dynamics. It's used to indicate that this column is used to look up the record in the target entity.
@@ -560,6 +576,24 @@ To write data into a lookup field using alternate key columns, follow this guida
560
576
> [!Note]
561
577
> Currently this is only supported when you use inline mode in the sink transformation of mapping data flows.
562
578
579
+
580
+
# [Azure Synapse](#tab/synapse-analytics)
581
+
582
+
1. Ensure your source contains all the lookup key columns.
583
+
584
+
2. The alternate key columns must be mapped to the column with the special naming pattern `{lookup_field_schema_name}@{alternate_key_column_name}`. The column doesn't exist in Dynamics. It's used to indicate that this column is used to look up the record in the target entity.
585
+
586
+
4. Pass your value to the column with a structure like this: _"/{entity name}s(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx)"_
587
+
588
+
>[!IMPORTANT]
589
+
> Your the entity name should be plural and lowercase.
590
+
>[!TIP]
591
+
> To generate this value, you can use the **Derived Column** block, for example, putting `"/{entity name}s(" + {dynamic lookup entity name} + ")"` into the expression field.
592
+
> [!Note]
593
+
> Currently this is only supported when you use inline mode in the sink transformation of mapping data flows.
594
+
595
+
---
596
+
563
597
## Mapping data flow properties
564
598
565
599
When transforming data in mapping data flow, you can read from and write to tables in Dynamics. For more information, see the [source transformation](data-flow-source.md) and [sink transformation](data-flow-sink.md) in mapping data flows. You can choose to use a Dynamics dataset or an [inline dataset](data-flow-source.md#inline-datasets) as source and sink type.
0 commit comments