Appirio's Tech Blog

Thursday, February 24, 2011

Installing Ruby 1.8 and & 2.3.8 for ActiveSalesforce

I've been working for the past week or two on my Ruby for Force.com Developers series but have run into a few snags. First of all the ActiveSalesforce adapter doesn't work with Rails 3.0.3. There's a post on the message boards where Quinton Wall mentions that he is working with Heroku and is looking to write a new Ruby toolkit. Any new toolkit will be REST-based and move away from the active-record model but no ETA as of now.

So my other alternative was to go the REST route since I've already done it in Java. Pat Patterson has a great Cookbook Recipe but it uses the Sinatra framework and has confusing instruction on setting up na SSL reverse proxy with different HTTP servers. Setting up SSL with Rails 3.0.3 is a breeze and since my Ruby series is already headed down that path, I decided to stick with Rails. I quickly spun up a new Rails app and started working on the OAuth dance. I had no problems authorizing my app with salesforce.com and returning the code, however, when trying to POST to salesforce.com to get my token, I received a mysterious "end of file" error. Based upon the Ruby message boards, a number of people are having struggles with OAuth so I enlisted Quinton to see if he can help me. Hopefully we'll have a Rails 3 solution soon and I can add that to my developer series.

Note: We had an Appirio AppDev CoE call with Ben Scofield (Heroku's developer advocate) last week and he suggested rolling a solution with OmniAuth. I think we are going to post a CloudSpokes contest to build this out for everyone.

So I decided to downgrade to an earlier version of Ruby and Rails so that I could use ActiveSalesforce for my developer series. I ended up (finally!) installing Ruby 1.8.7 and Rails 2.3.8 on a Ubuntu 10.10 VM. I think I could have used Ruby 1.9.2 but was caught in version hell. There are a couple of conflicting articles on how to setup your Rails environment (this one seems to be the best) but I finally got it working with a little help from the ActiveSalesforce Google Group.

Here are the steps that I went through on a fresh install of Ubuntu:

apt-get install ruby-full

wget production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz

tar -xvf rubygems-1.3.7.tgz

cd rubygems-1.3.7/

ruby setup.rb

ln -s /usr/bin/gem1.8 /usr/bin/gem

gem install rdoc

# install the 2.3.8 version of rails
gem install --version=2.3.8 rails --include-dependencies

# install sqlite dev lib
apt-get install libsqlite3-dev

# install rubygem
apt-get install rubygems

# install bundler
gem install Bundler

# install sqlite3
gem install sqlite3-ruby

# install rake
gem install rake

# install rforcedotcom
gem install rforcedotcom

# install the older version of facets for toolkit
gem install -v=2.8.4 facets

# install hpricot
gem install hpricot

# install the soap adapter
gem install asf-soap-adapter

Sunday, February 20, 2011

Learning Ruby for Force.com Developers – Part 3

This is part #3 of my adventures of learning Ruby for Force.com developers. If you missed parts #1 and #2 you might want to take a look at those just to get up to speed. Again, these are my goals for this series:
  • Learn Ruby
  • Develop an app locally using Ruby on Rails and the default SQLite database (this is where we are at right now)
  • Modify the app to use Database.com and the Force.com Toolkit for Ruby instead of the SQLite database
  • Deploy the app to Heroku
  • Modify the app to use Database.com and the REST API
In this post we’ll get started building a web app using Ruby on Rails and SQLite. In a nutshell we’ll be building a shopping cart app with a little twist. I do a lot of work for Medisend International, which is a non-profit that ships medical supplies to developing countries (among other things). They have an (old) international aid self-service portal that allows aid recipients (typically hospital administrators or local NGOs) to create a shipment and select medical supplies to be shipped to their country. We’ll be building a replacement with Ruby on Rails.

Before you get started you might want to go through Get Started with Rails which has a lot of great stuff. I’m only using a subset of the functionality outlined in this guide so you’ll definitely want to go through this entire article. I’ll zip up all of the code for this part so you can download it and pick it apart.

The first thing we’ll want to do is install our software needed for Rails. I had some issues during some of the installations but unfortunately I can’t help out much so hopefully things go well for you. First, open Terminal and run the following lines:

sudo gem update –system
sudo gem install rails
sudo bundle install
sudo gem update rake
sudo gem update sqlite3-ruby


Now that all of your software is (hopefully) installed let’s start building the app using SQLite to store data. Open Terminal and change to the directory where you want to store your files (~/Documents/Programming/Ruby in my case) and run the following command to create the application:

rails new mediaid-sqlite

This will create a Rails application called MediaidSqlite in a directory called mediaid-sqlite. Now switch to this new directory:

cd mediaid-sqlite

Rails created an entire directory structure for us with all of the files we need to begin building out the app. Feel free to take a look. We’ll mainly be working in the app directory. Since we’ll be using SQLite, run the following command to create an empty database:

rake db:create

This will create both a development and test SQLite databases inside the db/ folder. You now have a fully functional Rails application. To see it in action, fire up the web server on your local development machine by running:

rails server

If all goes well, when you point your browser to http://localhost:3000 you should see the following:



To stop the web server, simply hit Ctrl+C in the same Terminal window. I typically have at least two Terminal tabs open; one for the server and one for running commands. When running in development mode, Rails does not generally require you to bounce the server when changes are made; changes and files will be automatically picked up by the server.

For the required “Hello World” for the home page, you need to create at minimum a controller and a view. Fortunately, you can do that in a single command. Run the following command in Terminal:

rails generate controller home index

Now we need to delete the default page from your application so Rails will not load it by default. We need to do this as Rails will deliver any static file in the public directory in preference to any dynamic contact we generate from the controllers:

rm public/index.htm

Now, you have to tell Rails where the new home page is located. Open the file config/routes.rb in Textmate or your favorite editor. This is your application’s routing file which holds entries in a special DSL that tells Rails how to route incoming requests to your controllers and actions. This file contains many commented out sample routes, and one of them actually shows you how to connect the root of your site to a specific controller and action. Find the line beginning with :root to towards the end of the file, uncomment it so that is looks like the following:

root :to => “home#index”

One of the cool thing about Rails is the scaffolding. Rails scaffolding is a quick and easy way to generate some of the major pieces of an application such as models, views, and controllers for a new resource. It provides the basic functionality and UI to CRUD records. We can create the scaffolding for Shipment and InventoryItem with just a few easy commands. The command below creates the scaffolding for the Shipment resource and specifies the fields for the model:

rails generate scaffold Shipment name:string country:string shipmentType:string status:string shipDate:date items:integer selected:integer reserved:integer

One of the outputs of the rails generate scaffold command is a database migration script. Migrations are Ruby classes that are designed to make it simple to create and modify database tables. Rails uses rake commands to run migrations, and it’s possible to undo a migration after it’s been applied to your database. Migration filenames include a timestamp to ensure that they’re processed in the order that they were created. Now use the following rake command to run the migration:

rake db:migrate

Now we need the InventoryItems to add to our Shipments. Run the following rails generated scaffold command to create the InventoryItems scaffolding:

rails generate scaffold InventoryItem name:string itemNumber:string category:string status:string shipment:integer

Now run the rake command to perform the database migration for InventoryItems:

rake db:migrate

So now we have our database setup and the basic functionality generated for us by Rails. Some people don’t like the scaffolding and prefer to code from scratch but I’m going to simply modify the code generated by the scaffolding. The application consists of essentially 6 view and one controller. We’ll look at the views first and then dig into the controller.

Home Page

The home page displays a summary of the available shipments and allows the user to select a shipment to process. There are also links at the bottom to access the auto-generated UI to CRUD records for both shipments and inventory items.


Welcome to MediSend's MediAid!

MediAid is an international aid, self-service portal for inventory selection, processing and information centralization.

The following shipments are available for your aid case:

<% @shipments.each do |shipment| %> <% end %>
Shipment Type Status
<%= link_to shipment.name, shipment %> <%= shipment.shipmentType %> <%= shipment.status %>

The following options are also available:

  • <%= link_to "Maintain Shipments", shipments_path %>
  • <%= link_to "Maintain Inventory Items", inventory_items_path %>

Shipment Display

This page is where most of the work is done for a shipment. It provides the relevant info on the shipment and allows the users to manage the shipment’s contents.


<%= notice %>

Shipment <%= @shipment.name %>

Status: <%= @shipment.status %> Type: <%= @shipment.shipmentType %> Country: <%= @shipment.country %> Items: <%= @shipment.items %> Selected: <%= @shipment.selected %> Reserved: <%= @shipment.reserved %>

Available options for this shipment:

  1. <%= link_to 'View items in this shipment', items_shipment_path(@shipment) %>
  2. <%= link_to 'Add items by product category to this shipment', additems_shipment_path(@shipment) %>
  3. Mark all items as "reserved" for this shipment
  4. Remove all items from this shipment
  5. <%= link_to 'View this shipment\'s manifest', manifest_shipment_path(@shipment) %>

<%= link_to 'Edit', edit_shipment_path(@shipment) %> | <%= link_to 'Back', shipments_path %>

Add Inventory Items

The add items pages displays the number of available inventory items by category and if there is at least one available, provides the user with a link to add all of the available items. Clicking the link runs the addAll route to add the items to the shipment and then redirect the user back to the shipment display page.


Add Inventory by Category

Category Available Add All
Surgical Gloves <%= @gloves %> <% if @gloves > 0 %>Add All<% else %>Add All<% end %>
Nebulizer Accessory Kits <%= @nebulizer %> <% if @nebulizer > 0 %>Add All<% else %>Add All<% end %>
Hyperinflation Systems <%= @hyperinflation %> <% if @hyperinflation > 0 %>Add All<% else %>Add All<% end %>
Breathing Circuits <%= @circuit %> <% if @circuit > 0 %>Add All<% else %>Add All<% end %>
Armboards <%= @armboard %> <% if @armboard > 0 %>Add All<% else %>Add All<% end %>
<%= link_to 'Back', shipment_path(@shipment) %>

View Shipment Inventory Items

The page simply displays the inventory items currently assigned to this shipment.


Items for Shipment <%= @shipment.name %>

<% @items.each do |item| %> <% end %>
Item Name Category Status
<%= item.itemNumber %> <%= item.name %> <%= item.category %> <%= item.status %>
<%= link_to 'Back', shipment_path(@shipment) %>

Mark Items as Reserved

Items that have been added to the shipment need to be marked as reserved so that they can be processed for shipping. Clicking “OK” runs the reserve route to mark the items in the shipment as reserved and then redirect the user back to the shipment display page.



Remove Items from Shipment

Users may want to remove all of the items from their shipment and begin the process anew. Clicking “OK” runs the remove route which removes all of the items from the shipment, making them available again, and then redirects the user back to the shipment display page.



Routes

To process the flow of our application we need to modify app/routes.rb to include our new pages. Here’s a snippet from the beginning of the file:

resources :inventory_items
 
resources :shipments do
  member do
    get 'additems' # /shipments/1/additems
    get 'addAll'   # /shipments/1/addAll
    get 'items'    # /shipments/1/items
    get 'remove'   # /shipments/1/remove
    get 'reserve'  # /shipments/1/reserve
    get 'manifest' # /shipments/1/manifest
  end
end  
 
get "home/index"

ShipmentController

Last but not least is the ShipmentController. Controllers provide the “glue” between models and views. In Rails, controllers are responsible for processing the incoming requests from the web browser, interrogating the models for data, and passing that data on to the views for presentation. Take a look at the following code which should explain quite a bit. Since the controller contains code both generated by Rails and added by me, I’ve annotated it for your viewing ease.

class ShipmentsController < ApplicationController
  # GET /shipments
  # GET /shipments.xml
  def index
    @shipments = Shipment.all
 
    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @shipments }
    end
  end
 
  # GET /shipments/1
  # GET /shipments/1.xml
  def show
    @shipment = Shipment.find(params[:id])
 
    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @shipment }
    end
  end
 
  # GET /shipments/new
  # GET /shipments/new.xml
  def new
    @shipment = Shipment.new
 
    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @shipment }
    end
  end
 
  # GET /shipments/1/edit
  def edit
    @shipment = Shipment.find(params[:id])
  end
 
  # CUSTOM
  # GET /shipments/1/additems
  def additems
    @shipment = Shipment.find(params[:id])
 
    # get a a count of the available inventory by category
    @gloves = InventoryItem.where(:category => 'Gloves', :status => 'Available').count
    @nebulizer = InventoryItem.where(:category => 'Nebulizer', :status => 'Available').count
    @hyperinflation = InventoryItem.where(:category => 'Hyperinflation', :status => 'Available').count
    @circuit = InventoryItem.where(:category => 'Circuits', :status => 'Available').count
    @armboard = InventoryItem.where(:category => 'Armboards', :status => 'Available').count
  end
 
  # CUSTOM
  # GET /shipments/1/addAll
  def addAll
    @shipment = Shipment.find(params[:id])
 
    # add all of the avaiilable items for the category to the shipment as 'selected'
    InventoryItem.where(:category => params[:category], :status => 'Available').each do |item| 
      # assign the item to the shipment
      item.shipment = @shipment.id
      # set the status as 'selected'
      item.status = 'Selected'
      item.save
    end
    # update the shipment with total number of items on it
    @shipment.items = InventoryItem.where(:shipment => @shipment.id).count
    # update the shipment with the total number of 'selected' items
    @shipment.selected = InventoryItem.where(:shipment => @shipment.id, :status => 'Selected').count
    @shipment.save
    respond_to do |format|
      format.html { redirect_to(@shipment, :notice => 'Items have been successfully added.') }
      format.xml  { head :ok }
    end
  end
 
  # CUSTOM
  # GET /shipments/1/items
  def items
    @shipment = Shipment.find(params[:id])
 
    # fetch all of the items on the shipment regardless of status
    @items = InventoryItem.where(:shipment => @shipment.id).order(:name)
  end
 
  # CUSTOM
  # GET /shipments/1/manifest
  def manifest
    @shipment = Shipment.find(params[:id])
 
    # fetch all of the items on the shipment regardless of status
    @items = InventoryItem.where(:shipment => @shipment.id).order(:name)
  end    
 
  # CUSTOM
  # GET /shipments/1/remove
  def remove
    @shipment = Shipment.find(params[:id])
 
    # remove all items on the shipment
    InventoryItem.where(:shipment => @shipment.id).each do |item| 
      # remove it from the shipment
      item.shipment = nil
      # mark the item as available
      item.status = 'Available'
      item.save
    end
 
    # update the shipment with the correct counts
    @shipment.items = 0
    @shipment.reserved = 0
    @shipment.selected = 0
    @shipment.save
    respond_to do |format|
      format.html { redirect_to(@shipment, :notice => 'All items removed from the shipment.') }
      format.xml  { head :ok }
    end
  end
 
  # CUSTOM
  # GET /shipments/1/reserve
  def reserve
    @shipment = Shipment.find(params[:id])
 
    # mark all items on the shipment as reserved
    InventoryItem.where(:shipment => @shipment.id).each do |item| 
      item.status = 'Reserved'
      item.save
    end
 
    # get a count of the number of reserved items on the shipment
    @shipment.reserved = InventoryItem.where(:shipment => @shipment.id).count
    @shipment.save
    respond_to do |format|
      format.html { redirect_to(@shipment, :notice => 'All items were successfully marked as reserved.') }
      format.xml  { head :ok }
    end
  end
 
  # POST /shipments
  # POST /shipments.xml
  def create
    @shipment = Shipment.new(params[:shipment])
 
    respond_to do |format|
      if @shipment.save
        format.html { redirect_to(@shipment, :notice => 'Shipment was successfully created.') }
        format.xml  { render :xml => @shipment, :status => :created, :location => @shipment }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @shipment.errors, :status => :unprocessable_entity }
      end
    end
  end
 
  # PUT /shipments/1
  # PUT /shipments/1.xml
  def update
    @shipment = Shipment.find(params[:id])
 
    respond_to do |format|
      if @shipment.update_attributes(params[:shipment])
        format.html { redirect_to(@shipment, :notice => 'Shipment was successfully updated.') }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @shipment.errors, :status => :unprocessable_entity }
      end
    end
  end
 
  # DELETE /shipments/1
  # DELETE /shipments/1.xml
  def destroy
    @shipment = Shipment.find(params[:id])
    @shipment.destroy
 
    respond_to do |format|
      format.html { redirect_to(shipments_url) }
      format.xml  { head :ok }
    end
  end
end

Summary

That’s our application in a nutshell. You can download a zip of the entire project from here. In the next part of the series we’ll dive into the Force.com Toolkit for Ruby and really start to integrate with the platform.

Related Posts:

Tuesday, February 8, 2011

Upcoming Salesforce.com Spring '11 Features

The salesforce.com Spring '11 release is set to start rolling onto orgs in the next few days. Are you ready? This release is packed with all kinds of platform #superfrickinawesome-ness!! Once again, I've scoured through all 88 pages of the release notes and pulled out my favorite features. I didn’t hit all of the items in the release notes so make sure you pull up the PDF and check out all of the goodies for this release. Also check out the Spring ’11 Force.com Platform Release Preview page for any last minute info. I've tried to link the features below to the appropriate section in the preview site for more info.

There are a number of new enhancements across the platform but developers really come out ahead with this release. Last fall I named the Winter '11 release, "OMG! We Love Outlook!" due to the heavy emphasis on Salesforce for Outlook. I've aptly named the Spring '11 release "Developers! Developers! Developers!". You'll see why as the article progresses.

Google Chrome Support
  • Hurrah! Salesforce now supports Google Chrome version 8.0.x and Google Chrome Frame plug-in for Microsoft® Internet Explorer.
  • Now there's no reason why you shouldn't be using my kick-ass Chrome plugin, the Force.com Utility Belt.
Chatter Enhancements
  • Like - Finally.. I was getting so sick of typing "Like" into my Chatter comments! You can now Like and unLike posts but not comments.
  • @Mentions - You can now mention a person's name to ensure that the person sees the update.
  • Posting Comments via Email Replies - You can now reply to Chatter posts and comments by simply replying to the email notification. #Awesome!
  • Trending Topics - The Chatter tab now includes Trending Topics to show what people in your company are talking about.
  • Follow Dashboard Components - Only metrics and gauges with conditional highlighting are eligible.
  • Live Updates - You can now click You have new updates at the top of a feed to see updates added to your Chatter feed since your last refresh.
  • Private File Sharing - Privately share a file with specific Chatter users. There are a bunch of settings around this such as email notifications after sharing, see where a file is shared, view and search for files shared by me, upload a new version, file sharing settings and permission. Check out the docs for more details.
  • Private Group Requests by Email - You can now click a button to automatically send an email to a group's owner and managers requesting permission to join a Chatter group.
  • Recommend People and Records - Chatter now recommends records for you to follow as well as people based on a shared interest in records.
  • Searchable Chatter Fields - The Global Search now includes Chatter feed results.
  • Chatter Desktop - New version of Chatter Desktop for Adobe Air
  • Chatter Mobile - Available for iPhone, iPad and BlackBerry devices. The Chatter mobile app does not have all of the functionality of Chatter in Salesforce.
  • Chatter Triggers - You can now write triggers for the FeedComment and FeedItem objects. More details here. Thanks Sandeep!
Sales Cloud
  • The Cloud Scheduler is now enabled by default for all organizations.
  • The Attachments related list is now automatically added to task and event records for new orgs. You'll need to add it manually for existing orgs.
  • Attachments are now searchable for tasks and events.
  • Attachments on emails that are sent using Email to Salesforce or Salesforce for Outlook can now be saved with the email's task record in Salesforce.
  • Salesforce for Outlook now uses OAuth-based authentication to securely store user login information.
Service Cloud
  • Salesforce Knowledge now supports multiple languages
  • Salesforce Knowledge Sidebar for the Service Cloud Console automatically searches and returns articles from your knowledge base that matches any of the words in the Subject of a case.
  • Global Search is the sole search tool for the Service Cloud Console
Report Builder Enhancements
  • New chart type for reports - scatter charts
  • Report builder is now available to users with Force.com and Salesforce Platform licenses
  • Group and Professional Edition orgs can now use report builder
  • All profiles get access to the report builder by default
  • More info here.
Dashboard Enhancements
  • Dashboard builder is automatically enabled for all users
  • More Dynamic Dashboards per edition: EE-up to five per org, UE-up to 10 per org, DE-up to three per org. I've also heard that there might be a black tab to increase these numbers.
  • Post a snapshot of a dashboard component to a user's Chatter feeds
  • You can show Chatter user and group photos in horizontal bar charts and tables in dashboards
Revised Apex Governor Limits
  • There is now a single context for all governor limits! Be still my beating heart!! All governor limits have the same amount of resources allocated to them, regardless if you're calling it from trigger, an anonymous block, a test, and so on.
  • The total number of DML statements issued for a process has gone from 20 for triggers, and 100 for everything else, to 150 for all contexts.
  • Total number of records retrieved by SOQL queries has gone from 10K to 50K
  • More info here.
REST API - Develop mobile and external apps in Java, Ruby, Python, PHP etc. using the REST API as an alternative to the SOAP-basedAPI. The REST API is a simplified approach for developers, using code that is much less verbose and easy to write. More info here.

Criteria-Based Sharing Rules - Instead of using Triggers to create and delete sharing rules, you can now declaratively create sharing rules based upon some criteria of the record (i.e. when BillingState = 'NY'). You can create criteria-based sharing rules for accounts, opportunities, cases, contacts, and custom objects. There is a limit of 10 criteria-based sharing rules per object. More info here.

Visualforce Inline Editing - A single component, <apex:inlineEditingSupport>, provides inline editing support in your Visualforce details pages. Now users will have the same editing experience in your Visualforce page that they get in standard page layouts. Inline editing is supported by 8 components so check out the docs for more details. Inline editing is not supported for rich text areas or dependent picklists. More info here.

Visualforce Dynamic Bindings - This feature allows you to write generic Visualforce pages that display information about records without necessarily knowing which fields to show. Administrators/developers can create fields sets that determine at runtime the files to be displayed. Therefore, when at you need to modify the fields on a Visualforce page you simply modify the associated field set instead of modifying the Apex controller and Visualforce page. More info here along with a blog post.

Change Sets - This admin features allows you to package up a number of configuration changes in one org and send them to another org to be deployed. Essentially the same as deploying with the Force.com IDE but you can now give administrators (non-developers) access to install modifications from sandbox. More info here.

Force.com Flow - Formerly Visual Process Manager, this is a client-side tool that allows you to design complex, robust scripting processes that you can embed in your Visualforce pages. You can also embed Flows in Visualforce pages to be used with Force.com Sites, the Customer Portal and the partner portal. This is gonna be big!! More info here.

System Log Console Execution Summary - The system log contains a new tab to highlight the duration and composition of a request so you can identify and isolate execution bottlenecks. There is also a new section that details the value of variables during a request. More info here.

Daily Limit on Workflow Alert Emails - To prevent abuse of email limits, the daily limit for emails sent from workflow and approval-related email alerts is 1,000 per standard Salesforce license per organization. The overall organization limit is 2 million.

Web Service Connector - The WSC replaces Apache Axis 1.3 as the preferred SOAP Java client framework. WSC is an open-source project and contains a command utility that generates Java source and bytecode files from WSDL files.

New & Modified API Objects
  • LoginHistory - Represents the login history for all successful and failed login attempts for organizations and enabled portals.
  • ContentDocumentLink - Represents the link between a Salesforce CRM Content document or Chatter file and where it's shared.
  • FeedLike - Indicates that a user has liked a feed item.
  • CollaborationGroupMemberRequest - Represents a request to join a private Chatter group.
  • DashboardComponent - Represents a dashboard component (read-only)
  • DashboardComponentFeed - Represents a single feed item in the feed displayed on a dashboard component.
  • A number of Chatter and Metadata API objects have been changed in API version 21.0 so check out the docs for details.
Pilot and Developer Previews

Javascript Remoting for Apex Controllers - Developer Preview - This new feature allows you to integrate Apex and Visualforce pages with JavaScript libraries. It provides support for some methods in Apex controllers to be called via Javascript using the @RemoteAction annotation. More info here.

Apex Test Framework - Pilot - Run just one, a set, or all the tests in your organization. Tests are run asynchronously: start them, then go work on other things. You can then monitor the tests, add more tests to the ones that are running, or abort running tests. Once a test finishes running, you can see additional information about that test run.

ReadOnly Annotation - Pilot - The @ReadOnly annotation provides developers the ability to perform unrestricted queries against the Force.com database. The annotation removes the limit of the number of returned rows for a request but also blocks any DML statements within the request. The @ReadOnly annotation is only available for Web services and the schedulable interface.

Chatter for Mobile Browsers - Pilot - In addition to the Chatter mobile app for Apple and BlackBerry devices, salesforce.com provides a mobilized Web version of Chatter that you can access from a mobile device browser without installing an app.
 
2006-2012 Appirio Inc. All rights reserved.
Appirio.com | Support | Resource Center | Contact | Careers | Privacy Policy