Created
July 29, 2014 22:01
-
-
Save endymion/d5acf44be284d4feeda2 to your computer and use it in GitHub Desktop.
Merge Salesforce objects using Ruby SOAP API code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'soapforce' | |
request = <<"EOC" | |
<request> | |
<masterRecord> | |
<ns7:type xmlns:ns7="urn:sobject.partner.soap.sforce.com">Lead</ns7:type> | |
<ns8:Id xmlns:ns8="urn:sobject.partner.soap.sforce.com">00Qo0000002gZlTEAU</ns8:Id> | |
</masterRecord> | |
<recordToMergeIds>00Qo0000002gZldEAE</recordToMergeIds> | |
</request> | |
EOC | |
client = Soapforce::Client.new | |
client.authenticate(:username => '[redacted]', :password => '[redacted]') | |
client.merge(request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment