Tuesday, February 5, 2013

QR Code in Salesforce object field

There may be requirement that a QR Code needs to be generated in a field.
Say, for Contact record in Salesforce. With the Contact informations available, a QR Code will be generated.

First we need to know what is QR Code?
http://en.wikipedia.org/wiki/QR_code

Now  in Contact:


Field APi Name: QRCode__c

Data Type        :Formula
 
IMAGE('https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=MECARD:N:' + FirstName + ' ' + LastName +';ADR:'+ MailingStreet +',' + MailingCity + ',' + MailingState + ',' + MailingCountry + ',' + MailingPostalCode + ';TEL:'+ MobilePhone +';EMAIL:' + Email + ';', 'Scan the QR code to create contact in your mobile' )
Now you just scan the QR code coming at you COntact record and see how it works!