9

Every time a request is properly handled by the server, one API call is consumed. Specifically, in regards to queries, there's two functions, named query and queryMore. Every call to query and queryMore counts as one API call. So, the more records you return, the more times you'll have to call queryMore, and the more API calls you'll consume. As you may know,...


7

Take a look at the databasedotcom ruby gem. (It works across with Salesforce/Force.com as well.) It's an amazing wrapper around the REST API. Here is the gem, along with a couple write-ups as well. https://github.com/heroku/databasedotcom https://rubygems.org/gems/databasedotcom http://wiki.developerforce.com/page/Accessing_Salesforce_Data_From_Ruby ...


4

There have been similar questions before, for example https://stackoverflow.com/questions/7810801/how-to-describe-enumerate-picklist-enties-valid-for-a-specific-record-type-in I don't think it's possible. REST API will only let you learn the relationships between dependent picklists (which values in child are valid for which values on parent) and if you ...


4

This error is not about the batchsize which you are thinking of. This is occurring in the parallel mode when API tries to lock the parent record or any record in the relationship at the time of updating the child record. Let's say, you are trying to update Contact record through Bulk API and during update it will try to lock the Parent Account record and ...


3

There is no standard "Local Time" Field on the Lead object. It is likely that this is a custom field specific to your org. You would need to find out the API name of the field, and update your rails app to include that data element as well.


2

You need to authenticate yourself first using the "user-agent" or "web-server" flow (see here) to retrieve the parameters you need. The application you set up in Salesforce provides you with a client secret and id but the token is only retrieved after access has been granted from Salesforce. If you authenticate with the username and password option in ...


2

I have used figaro gem for development where it stores all the environment variables in application.yml. The common mistakes that I have made was pushing secure variables to your version control system like git and github. So you have to make sure you ignore these files when you are doing git push to any public repo. Gems like figaro auto populates yml ...


2

The answer is... who knows? What's more important here is how many page loads and/or callbacks you have per day, not the number of unique visitors. For example, a shopping cart built on Salesforce.com would probably run into API limits, but a simple page with little interaction wouldn't run into API problems. You might want to use some analytic tools, like ...


2

I'm going to refer you to two documents that I believe will answer your questions. The first is Salesforce Help page Connected Apps Overview and the pages that follow it, which will walk you through in detail, all of the set-up in Salesforce that's required for a Connected app. The 2nd is from the Integration Workbook. I recommend you look at Tutorial #3: ...


2

I don't speak Ruby, but what you need to be doing to filter Contacts is querying against the OpportunityContactRole junction object. OpportunityContactRole connects Contacts to Opportunities and specifies Roles fulfilled by the Contact. Where you have contacts = client.query("select Id, FirstName, LastName, Email from Contact where AccountId = '#{o["...


2

Bulk API Interface The way you're using the Bulk API is going to cause some species of problem, and it's likely that it's exacerbating issues with lock contention that might otherwise be occasional at worst. The mode of operation of the Bulk API is that you open a job, submit (usually quite large) batches of records against that job, and then kick it off. ...


2

I had been in a similar situation very recently and was able to resolve it by following some of the guidance as provided in the help documentation which is referenced here. OVERVIEW UNABLE_TO_LOCK_ROW is caused when Salesforce services place a lock on a record, whenever a record is being updated or created. This is to prevent any other process/operation to ...


1

I am the CometD Project leader but I don't know the details of the SalesForce integration, so my answer may or may not apply. When a CometD client first connects to a CometD server, it sends a handshake request. The server replies with a handshake reply and sends back a normal HTTP cookie called BAYEUX_BROWSER. Every subsequent message sent by the client ...


1

Restforce::Collection is the object the restforce gem wraps the result of your query() API call around. And it is always a collection, which means that even a COUNT query will be wrap around something that resembles an Array. In order to get the result you want, you have to take the first (and only) record from this collection and look for expr0, which is ...


1

You can only create and upload an App to the App Exchange that is based on Salesforce (Standard objects, fields, Visualforce pages, apex controllers, lightning components, etc), which doesn't support Python. The closest you are going to be able to get is by creating an app that is communicating with your python server. If your app is going to be a paid app, ...


1

With your given object structure you won't need the JSON generator, just use serialize: RootObject root=new RootObject(); root.activity=new Activity(); Example objBody=new Example(); objBody.id='S001'; objBody.cookie_id=''; objBody.name='Ramesh'; objBody.source='Mail'; root.activity=objBody; return JSON.serialize(root); Please add the code from the ...


1

Based on the code, it looks like you'd have something like the following: Map<String, Object> params = (Map<String, Object>)JSON.deserializeUntyped( '{ "to_account":"Example user", "token":"5TH3ACC3AU21", "transaction_reference":"", "from_account":"First1 Last1", "from_fund":"THE TORONTO-DOMINION BANK", "transaction_type":"...


1

Check the Account Triggers.The value might be inserted through trigger.


1

The + symbol is reserved in SOQL, this is covered in the documentation along with the other reserved characters: The following characters are reserved: ? & | ! { } [ ] ( ) ^ ~ * : \ " ' + - Reserved characters, if specified in a text search, must be escaped (preceded by the backslash \ character) in order to be properly interpreted. An error ...


1

The lack of support for relationships appears to be an open issue Nested Associations/Relationships that is Array-based. A couple of forks are mentioned that perhaps you could use. (No commits to the project in the last year - not encouraging.) From Accessing Salesforce Data from Ruby: One of the most important gem limitations is a lack of support for ...


1

The convertLead method is AFAIK only available in the (older) SOAP API. databasedotcom builds on the REST API. As with any other language, you could start from the WSDL - here is a blog post on that Ruby and Salesforce Integration with SOAP. Google produced these two hits: http://www.ruby-doc.org/gems/docs/d/DerGuteMoritz-rforce-0.4.2/ConvertLead.html) (...


1

I am not sure on Ruby-specifics, but we manage a Java application that dynamically creates fields for an object and then also manages the Page Layout (according to our application-specific rules). We use the Salesforce Metadata API to do all this. Essentially, the Page Layout is just an XML document, so at worst, you'll have to code up a way to insert the ...


1

It's possible through the services API (Which is soap based). You can use my Metaforce gem to do this.


1

The databasedotcom is deprecated. Instead try restforce. It is a lightweight ruby client for the Salesforce REST API.


1

We are using the databasedotcom gem since a couple of month now. No issues with it.


Only top voted, non community-wiki answers of a minimum length are eligible