Sha256: d5293bb1a80f3943407477601785501f1f160deead31aec576182cf0f648c8ff

Contents?: true

Size: 702 Bytes

Versions: 4

Compression:

Stored size: 702 Bytes

Contents

#!/usr/bin/ruby
# vim: set tw=72 ai sw=2:

### User Configurable Constants ###

DefaultUser = 'changeme@salesforce.com'
DefaultPasswd = 'changemetoo'

###################################

require 'wsdl'
require 'pp'

user = ENV['RFORCE_USER'] || DefaultUser
passwd = ENV['RFORCE_PASS'] || DefaultPasswd


# Open a connection and login

if $DEBUG
  drv = RForce::WSDL.new(user, passwd, $DEBUG, 
	"http://na1-api.salesforce.com/services/Soap/c/6.0")
else
  drv = RForce::WSDL.new(user, passwd)
end

query_rslt = drv.query("select Id, Name, SerialNumber from Asset where SerialNumber like '%04BM%'")

query_rslt.records.each do |rec|
  puts "Id: #{rec.id}\tName: #{rec.name}\tSN: #{rec.serialNumber}"
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
aq1018-rforce-0.5.2 wsdl/sample/query.rb
aq1018-rforce-0.5.1 wsdl/sample/query.rb
DerGuteMoritz-rforce-0.4.2 wsdl/sample/query.rb
rforce-raygao-1.0.0 wsdl/sample/query.rb