February 12, 2012

Salesforce streaming API and Chrome desktop notifications

I likeimage chrome desktop notifications a lot, they specially help me with gmail running in browser always and keeping me updated about new mails/chats without keeping the gmail tab open. I also like the way gmail desktop notifications in chrome take to the email related with the notification, again saves time and clicks.

Salesforce PushTopic Desktop Notifications

I wanted something similar with Force.com Streaming API or the PushTopic notifications. If you are working on a crucial Campaign, Account, Lead or Opportunity, then instead of waiting for chat/email/phone for updates, one can setup PushTopics and get updated in close to real time using “chrome desktop notifications”. Something like this:
image

February 10, 2012

Tip: Using Decimal class with Strings in Apex

Today I came across an interesting problem that reminded me of my Java days. A piece of Apex code written by some other developer was broken, when I did my fixes.

Here is some background about the broken code, lets say the file name is “ScaryMovie.cls

February 9, 2012

jQuery-Mobile, HTML5, Javascript Remoting and Visualforce in Cooking !

For fun of cooking a mobile application, my peer developer Jagdeep developed a jQuery mobile based app prototype using Visualforce pages and Javascript Remoting on Force.com.

Here is a quick demo video of this application.

We’re happy about this small experiment because of a few reasons

February 1, 2012

New Idea, Getting Field ID in Apex Describe Information !

If you are planning to default input field values in an edit page for an Sobject, then you need to use something cryptic, like LKID hack. This hack requires you to pass field’s IDs as URL query params with default values for each, like:

https://na1.salesforce.com/a02/e?CF00N30000001cYtG={!Case.CaseNumber}&CF00N30000001cYtG_lkid={!Case.Id}&retURL=%2F{!Case.Id}&saveURL=%2F{!Case.Id}

This solution is really a hack, as there is no way in Apex describe information to know ID for a given sobject field. This makes your app or solution tough to port across the orgs, developers try to use custom settings to declare all such LKID fields, each one of them must be correctly updated by Admin post app installation.