How to use Visualforce Remote Objects with Salesforce 1 | Spring '14 | Release

by - 4:35 PM

Visualforce Remote Objects (Pilot) are the proxy objects that ease your development by allowing you to create instances of standard/custom salesforce objects and allow DML operations from javascript itself. Not sure, but this is likely moving towards direction of replacing JavaScript Remoting(read what is javascript remoting and how to use it here) and here is why 

Some cool features this offers over JavaScript remoting are :

1. Freedom from controllers
2. No Test classes
3. Easy code management
4. Not counted against API call

Read more about this here at Jitendra Zaa blog 

The Visual Remote Objects supports (in pilot release) basic DML operation like create read, update and delete in JavaScript without writing even a single line of Apex code.

To understand how different is it from JavaScript remoting, you should read the comparison here written by CTO of

Let test this features quickly on our own, by designing a visualforce page.  Here I have designed a page that pulls up ten accounts from Salesforce solely by using JavaScript Remote Objects (see picture below)

Just copy-paste the code in your org to test this by yourself. I am querying Accounts (standard object) and using bootstrap CDN (check what is bootstrap and cdn here) to style the page. At the moment, I wrote retrieve() operation that pulls ten records, soon ill update the code will perform all sort of DML operation mentioned in the documentation.

Test on Salesforce 1 :  this works like charm on Salesforce 1

You May Also Like