From e5c798bc1233b7ce9865ebef608e995a0c1b15c7 Mon Sep 17 00:00:00 2001 From: Jonas Rapp Date: Sat, 15 Jan 2022 18:22:28 +0100 Subject: [PATCH] Validation Info: link-entity use primid, not for M-M --- FetchXmlBuilder/AppCode/Validations.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FetchXmlBuilder/AppCode/Validations.cs b/FetchXmlBuilder/AppCode/Validations.cs index 5910e77f..21978b6f 100644 --- a/FetchXmlBuilder/AppCode/Validations.cs +++ b/FetchXmlBuilder/AppCode/Validations.cs @@ -36,7 +36,8 @@ internal static ControlValidationResult GetWarning(TreeNode node, FetchXmlBuilde return new ControlValidationResult(ControlValidationLevel.Warning, "Link-Entity must include Name, To, From."); } - if (fxb.GetAttribute(name, node.Value("from")) is AttributeMetadata fromAttr && fromAttr.IsPrimaryId == false) + if (node.Value("intersect") != "true" && + fxb.GetAttribute(name, node.Value("from")) is AttributeMetadata fromAttr && fromAttr.IsPrimaryId == false) { return new ControlValidationResult(ControlValidationLevel.Info, "Links to records that aren't parents may cause paging issues.", "https://markcarrington.dev/2021/02/23/msdyn365-internals-paging-gotchas/#multiple_linked_entities"); }