0

I encountered strange problem - when Im trying to get User information from SalesForce using databasedotcom gem like this:

owner = client.find("User", deal_from_sf.OwnerId)

I get ActiveRecord error ActiveRecord::RecordNotFound for User, id:0013000000XXXXX

How can I use this method without patching native gem (as I understand alias for find method will help)?

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
makaroni4
  • 2,281
  • 1
  • 18
  • 26

1 Answers1

1

The answer is so simple - read the documentation!!!

The problem obviously was in the namespace which was Global by default and User treated like ActiveRecord model. But one should add just one line to salesforce.yml file:

sobject_module : YourModuleName

and specify module where your salesForce logic lives)

http://rubydoc.info/github/heroku/databasedotcom/master/Databasedotcom/Client#sobject_module-instance_method

makaroni4
  • 2,281
  • 1
  • 18
  • 26