Skip to content

Commit

Permalink
querying only 2 months opportunities after getting 'Request Entity To…
Browse files Browse the repository at this point in the history
…o Large'
  • Loading branch information
ij committed Apr 14, 2015
1 parent aaa332a commit 6b68f21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sf/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ def self.intl_partner?(account_id)

# It looks up for the past one year
def self.inc_parts_to_be
acct_ids = Sf::Opportunity.inc_participations(Date.today.prev_month(12)).map(&:AccountId)
acct_ids = Sf::Opportunity.inc_participations(Date.today.prev_month(2)).map(&:AccountId)
accts_str = acct_ids.map{|v| "\'#{v}\'"}.join(', ')
build_collection Sf.client.query("select #{FIELDS_SELECT_STR} from Account where InCommon_Participant__c != true and Id in (#{accts_str})")
end

def self.inc_certs_to_be
acct_ids = Sf::Opportunity.cert_subscribers(Date.today.prev_month(12)).map(&:AccountId)
acct_ids = Sf::Opportunity.cert_subscribers(Date.today.prev_month(2)).map(&:AccountId)
accts_str = acct_ids.map{|v| "\'#{v}\'"}.join(', ')
build_collection Sf.client.query("select #{FIELDS_SELECT_STR} from Account where InCommon_Participant__c = true and Id in (#{accts_str})")
end
Expand Down

0 comments on commit 6b68f21

Please sign in to comment.