kevinohara80 / nforce

nforce is a node.js salesforce REST API wrapper for force.com, database.com, and salesforce.com
MIT License
474 stars 167 forks source link

Instantiating an SObject with an Id drops the Id #10

Closed kevinohara80 closed 11 years ago

kevinohara80 commented 11 years ago

If you create an SObject with a hash that contains the record Id, the Id is dropped from the SObject record

ChrisBland commented 11 years ago

I thought I was the only one seeing this. I was using the setExternalId method but I think I have a fix I can add here.

kevinohara80 commented 11 years ago

Are you using the createSObject method? I actually think it does keep the ID. I'm going to write some tests today to prove it out.

kevinohara80 commented 11 years ago

The attached commit has a passing test that proves that this is a non-issue. I don't know what I was thinking here.