Sha256: 9cd4e37bbb2762b61b26c2b083a3eb407421799d8749dd671ea136848a8f39d5
Contents?: true
Size: 776 Bytes
Versions: 4
Compression:
Stored size: 776 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_results = drv.query("select Id from Asset where SerialNumber like '%04BM%'") ids = query_results.records.map { |rslt| rslt.id } drv.retrieve("Name, SerialNumber, SE__c", "Asset", ids).each do |obj| puts "Name: #{obj.name}\tSN: #{obj.serialNumber}\tSE: #{obj.sE__c}" end
Version data entries
4 entries across 4 versions & 3 rubygems
Version | Path |
---|---|
aq1018-rforce-0.5.2 | wsdl/sample/retrieve.rb |
aq1018-rforce-0.5.1 | wsdl/sample/retrieve.rb |
DerGuteMoritz-rforce-0.4.2 | wsdl/sample/retrieve.rb |
rforce-raygao-1.0.0 | wsdl/sample/retrieve.rb |