From 7f3a08f308f0cc87bd3ed6b1d6ff374b6a65d451 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Thu, 9 Jul 2020 12:36:27 -0500 Subject: [PATCH 1/2] hiddenAll populatd --- force-app/main/default/classes/getRecommendations.cls | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/force-app/main/default/classes/getRecommendations.cls b/force-app/main/default/classes/getRecommendations.cls index 8b94f25d..06802f14 100644 --- a/force-app/main/default/classes/getRecommendations.cls +++ b/force-app/main/default/classes/getRecommendations.cls @@ -44,6 +44,7 @@ public with sharing class getRecommendations { SR.MailingCity = service.City__c; SR.Website = service.Website__c; SR.Hidden = false; + SR.HiddenAll = false; SR.totalRatings = 0; SR.Indicators = new List(); SR.Comments = new List(); @@ -185,6 +186,11 @@ public with sharing class getRecommendations { if (exclusions != null && exclusions.size() > 0) { rec.Hidden = true; } + for (Service_Exclusion__c exclusion : exclusions) { + if (exclusion.Contact__r == null) { + rec.HiddenAll = true; + } + } } return recs; } From c635e74ee71bb388e1ebc938ba2a9111e8c9cde2 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Thu, 9 Jul 2020 12:50:07 -0500 Subject: [PATCH 2/2] fix null exclusions --- force-app/main/default/classes/getRecommendations.cls | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/force-app/main/default/classes/getRecommendations.cls b/force-app/main/default/classes/getRecommendations.cls index 06802f14..2368f3b6 100644 --- a/force-app/main/default/classes/getRecommendations.cls +++ b/force-app/main/default/classes/getRecommendations.cls @@ -185,10 +185,10 @@ public with sharing class getRecommendations { ); if (exclusions != null && exclusions.size() > 0) { rec.Hidden = true; - } - for (Service_Exclusion__c exclusion : exclusions) { - if (exclusion.Contact__r == null) { - rec.HiddenAll = true; + for (Service_Exclusion__c exclusion : exclusions) { + if (exclusion.Contact__c == null) { + rec.HiddenAll = true; + } } } }