From 94f51e5948494be5e55395a0b5c40e2e082a6cad Mon Sep 17 00:00:00 2001 From: Jeanesily Date: Fri, 24 Aug 2018 08:36:06 -0600 Subject: [PATCH] Exclude Existing Business type from opportunities for cert_subscribers Exclude Existing Business type from opportunities for cert_subscribers --- lib/sf/opportunity.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sf/opportunity.rb b/lib/sf/opportunity.rb index c1807fe..30e8901 100644 --- a/lib/sf/opportunity.rb +++ b/lib/sf/opportunity.rb @@ -35,7 +35,7 @@ def self.inc_participations(since_date=nil) def self.cert_subscribers(since_date=nil) since_date ||=Date.today since = since_date.to_date.to_s - sobjects = Sf.client.query("select #{FIELDS_SELECT_STR} from Opportunity where Name like '%Certificate Service%' and IsWon = true and CloseDate >= #{since}") + sobjects = Sf.client.query("select #{FIELDS_SELECT_STR} from Opportunity where Name like '%Certificate Service%' and Type not like '%Existing Business%' and IsWon = true and CloseDate >= #{since}") build_collection sobjects unless sobjects.blank? end