From 552c91c71ea2e0e4f79423cf7bb097e2b952e050 Mon Sep 17 00:00:00 2001 From: jesuRule Date: Tue, 29 Oct 2024 17:22:42 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20parent=20relationship=20re?= =?UTF-8?q?solution=20(#42)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- force-app/repository/Query.cls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/force-app/repository/Query.cls b/force-app/repository/Query.cls index 30b7ad3..6df1c13 100644 --- a/force-app/repository/Query.cls +++ b/force-app/repository/Query.cls @@ -109,7 +109,7 @@ public virtual class Query { Schema.DescribeFieldResult parentFieldDescribe = parentFields[index].getDescribe(); builtUpFieldName += index == parentFields.size() - 1 ? parentFieldDescribe.getName() - : parentFieldDescribe.getRelationshipName() + '.'; + : parentFieldDescribe.getRelationshipName() ?? parentFieldDescribe.getName().replace('__c', '__r') + '.'; } return builtUpFieldName; }