Sha256: fc7a17fde47d33a1ca080dbda4effde85da80897b0bc886e553ca1696e940818

Contents?: true

Size: 461 Bytes

Versions: 4

Compression:

Stored size: 461 Bytes

Contents

require 'rforce'

email    = ENV['SALESFORCE_USER']
password = ENV['SALESFORCE_PASS']
token    = ENV['SALESFORCE_TOKEN']

binding = RForce::Binding.new \
  'https://www.salesforce.com/services/Soap/u/20.0'

binding.login \
  email, password + token

answer = binding.search \
  :searchString =>
    'find {McFakerson Co} in name fields returning account(id)'

account = answer.searchResponse.result.searchRecords.record
account_id = account.Id

puts account_id

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rforce-0.15 examples/simple.rb
rforce-0.14 examples/simple.rb
rforce-0.13 examples/simple.rb
rforce-0.12 examples/simple.rb