Skip to content

Commit 442820d

Browse files
committed
Merge branch 'master' into teams-ga
2 parents a3eb3d5 + f3f42af commit 442820d

File tree

362 files changed

+4537
-4002
lines changed

Some content is hidden

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

362 files changed

+4537
-4002
lines changed

.acrolinx-config.edn

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
{:allowed-branchname-matches ["^master$"]
22
:allowed-filename-matches ["powerapps-docs"]
3-
:targets
4-
{
5-
:scores
6-
{
7-
:qualityscore 80
8-
}
9-
}
103
:guidance-profile "dc59e3ef-24fd-46d7-9156-0491aaae6bef" ;; Profile ID for "BAG-specific"
114
:acrolinx-check-settings
125
{

powerapps-docs/developer/common-data-service/best-practices/business-logic/optimize-assembly-development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.topic: article
1414
ms.tgt_pltfrm: na
1515
ms.workload: na
1616
ms.date: 1/15/2019
17-
ms.author: phecke
17+
ms.author: pehecke
1818
search.audienceType:
1919
- developer
2020
search.app:

powerapps-docs/developer/common-data-service/cds-sql-query.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Use SQL to query data (Common Data Service) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
33
description: "Learn how to query Common Data Service entity data using SQL." # 115-145 characters including spaces. This abstract displays in the search result.
44
ms.custom: ""
5-
ms.date: 09/25/2020
5+
ms.date: 11/09/2020
66
ms.reviewer: "pehecke"
77
ms.service: powerapps
88
ms.topic: "article"
@@ -22,9 +22,8 @@ search.app:
2222

2323
[!INCLUDE[cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)]
2424

25-
> [!WARNING]
26-
> A problem has been identified with the Tabular Data Stream (TDS) endpoint. This feature is presently globally disabled as we work to address a security issue. A fix for the issue has been developed. Deployment of the fix and feature re-enablement to all public regions is planned for the first week of November 2020. A safe deployment practice is being followed so the feature may be available in your region earlier. Thank you for your patience on this matter.
27-
25+
> [!IMPORTANT]
26+
> This feature has been re-enabled in the majority of regions. Please resume testing, and provide feedback. We thank you for your patience and feedback.
2827
2928

3029
A SQL data connection is available on the Common Data Service endpoint. The SQL connection provides read-only access to the entity data of the target Common Data Service environment. This allows you to write and execute SQL queries against the entity data table. Table columns provide the attribute data of the entity. No custom views of the data have been provided.

powerapps-docs/developer/common-data-service/customize-entity-attribute-mappings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ For more information see [Create a new entity record from another entity](webapi
7373
You can edit attribute mappings between entities for entity relationships that support mapping.
7474

7575
In addition to creating each attribute map manually, you can use the
76-
`AutoMapEntity` message(<xref href="Microsoft.Dynamics.CRM.AutoMapEntity?text=AutoMapEntity Action" /> or <xref:Microsoft.Crm.Sdk.Messages.AutoMapEntityRequest> class) to generate a new set of attribute mappings. This message performs the action found under the **Generate Mappings** menu option in the **More Actions** menu on the toolbar (see [Automatically generate field mappings](../../maker/common-data-service/map-entity-fields.md#automatically-generate-field-mappings)). This message maps all the attributes between the two related entities where the attribute names and types are identical. This message is provided as a productivity enhancement so that you do not have to manually add all attribute mappings. Instead, you can generate a set of likely mappings and minimize the amount of manual work to add or remove individual mappings to meet your requirements.
76+
`AutoMapEntity` message(<xref href="Microsoft.Dynamics.CRM.AutoMapEntity?text=AutoMapEntity Action" /> or <xref:Microsoft.Crm.Sdk.Messages.AutoMapEntityRequest> class) to generate a new set of attribute mappings. This message performs the action found under the **Generate Mappings** menu option in the **More Actions** menu on the toolbar (see [Automatically generate column mappings](../../maker/common-data-service/map-entity-fields.md#automatically-generate-column-mappings)). This message maps all the attributes between the two related entities where the attribute names and types are identical. This message is provided as a productivity enhancement so that you do not have to manually add all attribute mappings. Instead, you can generate a set of likely mappings and minimize the amount of manual work to add or remove individual mappings to meet your requirements.
7777

7878
> [!NOTE]
7979
> Automatically generating mappings in this manner will remove any previously defined attribute mappings and may include mappings that you do not want.
@@ -100,4 +100,4 @@ For more information see [Create a new entity record from another entity](webapi
100100

101101
### See also
102102

103-
[Map entity fields](../../maker/common-data-service/map-entity-fields.md)
103+
[Map entity fields](../../maker/common-data-service/map-entity-fields.md)
47.8 KB
Loading
55.5 KB
Loading
-1.72 KB
Loading
27.4 KB
Loading

powerapps-docs/developer/model-driven-apps/clientapi/reference/Xrm-Utility/invokeProcessAction.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ For more information about actions, see [Use actions](/powerapps/maker/common-da
3737

3838
## Returns
3939

40-
On success, returns Web API result along with any action output.
40+
On success, returns an object with the Web API result along with any action output.
41+
On failure, returns an object with error details.
4142

4243
### Related topics
4344
[Use actions](/powerapps/maker/common-data-service/actions)

powerapps-docs/developer/model-driven-apps/clientapi/reference/Xrm-WebApi/online/execute.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,126 @@ Xrm.WebApi.online.execute(deleteRequest).then(
523523
);
524524
```
525525

526+
### Associate a record
527+
The following code sample demonstrates how to perform an Associate operation on collection-valued navigation properties (Many-To-One and Many-To-Many relationships). For single-valued navigation properties (One-To-Many relationships a.k.a Lookup fields), you can perform an Update operation as shown above or use [Xrm.WebApi.updateRecord](../updateRecord.md).
528+
529+
```JavaScript
530+
var Sdk = window.Sdk || {};
531+
532+
/*
533+
* Request to execute an Associate operation.
534+
*/
535+
Sdk.AssociateRequest = function(target, relatedEntities, relationship) {
536+
this.target = target;
537+
this.relatedEntities = relatedEntities;
538+
this.relationship = relationship;
539+
};
540+
541+
// NOTE: The getMetadata property should be attached to the function prototype instead of the
542+
// function object itself.
543+
Sdk.AssociateRequest.prototype.getMetadata = function() {
544+
return {
545+
boundParameter: null,
546+
parameterTypes: {},
547+
operationType: 2, // Associate and Disassociate fall under the CRUD umbrella
548+
operationName: "Associate"
549+
}
550+
};
551+
552+
// Construct the target EntityReference object
553+
var target = {
554+
entityType: "account",
555+
id: "0b4abc7d-7619-eb11-8dff-000d3ac5c7f9"
556+
};
557+
558+
// Construct the related EntityReferences that the Target will be associated with.
559+
var relatedEntities = [
560+
{
561+
entityType: "contact",
562+
id: "180a9aad-7619-eb11-8dff-000d3ac5c7f9"
563+
},
564+
{
565+
entityType: "contact",
566+
id: "753c58b4-7619-eb11-8dff-000d3ac5c7f9"
567+
}
568+
];
569+
570+
// The name of the existing relationship to associate on.
571+
var relationship = "new_account_contact";
572+
573+
var manyToManyAssociateRequest = new Sdk.AssociateRequest(target, relatedEntities, relationship)
574+
575+
Xrm.WebApi.online.execute(manyToManyAssociateRequest).then(
576+
function(result) {
577+
if (result.ok) {
578+
console.log("Status: %s %s", result.status, result.statusText);
579+
// perform other operations as required;
580+
}
581+
},
582+
function(error) {
583+
console.log(error.message);
584+
// handle error conditions
585+
}
586+
);
587+
```
588+
589+
### Disassociate a record
590+
The following code sample demonstrates how to perform a Disassociate operation on collection-valued navigation properties (Many-To-One and Many-To-Many relationships). For single-valued navigation properties (One-To-Many relationships a.k.a Lookup fields), you can perform an Update operation as shown above or use [Xrm.WebApi.updateRecord](../updateRecord.md).
591+
592+
> [!NOTE]
593+
> Unlike the Associate operation which allows associating the target entity record with multiple related entity records in a single operation, the Disassociate operation is limited to only disassociating one entity record from the target entity record per operation.
594+
595+
```JavaScript
596+
var Sdk = window.Sdk || {};
597+
598+
/*
599+
* Request to execute a Disassociate operation.
600+
*/
601+
Sdk.DisassociateRequest = function(target, relatedEntityId, relationship) {
602+
this.target = target;
603+
this.relatedEntityId = relatedEntityId;
604+
this.relationship = relationship;
605+
};
606+
607+
// NOTE: The getMetadata property should be attached to the function prototype instead of the
608+
// function object itself.
609+
Sdk.DisassociateRequest.prototype.getMetadata = function() {
610+
return {
611+
boundParameter: null,
612+
parameterTypes: {},
613+
operationType: 2, // Associate and Disassociate fall under the CRUD umbrella
614+
operationName: "Disassociate"
615+
}
616+
};
617+
618+
// Construct the target EntityReference object
619+
var target = {
620+
entityType: "account",
621+
id: "0b4abc7d-7619-eb11-8dff-000d3ac5c7f9"
622+
};
623+
624+
// The GUID of the related entity record to disassociate.
625+
var relatedEntityId = "180a9aad-7619-eb11-8dff-000d3ac5c7f9";
626+
627+
// The name of the existing relationship to disassociate from.
628+
var relationship = "new_account_contact";
629+
630+
var manyToManyDisassociateRequest = new Sdk.DisassociateRequest(target, relatedEntityId, relationship)
631+
632+
Xrm.WebApi.online.execute(manyToManyDisassociateRequest).then(
633+
function(result) {
634+
if (result.ok) {
635+
console.log("Status: %s %s", result.status, result.statusText);
636+
// perform other operations as required;
637+
}
638+
},
639+
function(error) {
640+
console.log(error.message);
641+
// handle error conditions
642+
}
643+
);
644+
```
645+
526646
### Related topics
527647

528648

0 commit comments

Comments
 (0)