WHAT IS QR CODE?
(Quick Response Code
) is the trademark for a type of matrix barcode (or two-dimensional barcode) first designed for the automotive industry in Japan.A barcode
is an optical label that is read by machines and contains information about the item to which it is attached.
There are four standardized encoding modes that a QR code
uses to efficiently store data.
Extensions may also be used.
QR Code in Salesforce:-
The Meaning of QR code
remains the same even in salesforce.
- Create QR code for any object in Salesforce.
- It will be auto-generated for all records in Salesforce.
- Scanning the particular QR code will take you to the record it is associated to.
You can pick any object, Let say we are using Account Object for implementing this functionality.
Steps to follow:
Explanation of above code:
- Click on Setup (on Top right of Salesforce Org )
- Then go to Quick Find box . Go to Customize then Accounts and then Fields.
- Click on New Button to create a new Custom Field.
- Select Formula field type .
- Give the Field name as “QR Code” and then select formula return type as Text.
- Then paste the following code in formula area: IMAGE(‘https://chart.googleapis.com/chart?chs=200×200&cht=qr&chl=https://cs87.salesforce.com/’&Id ,’Scan QR code to open record in mobile.’)
- Now you click on Next ,Next and the Click on Save .
- Now you can use any QR Code Scanner to verify the results .
- IMAGE(image_url, alternate_text [, height, width]) : is a function to show image with giving URL.
- https://chart.googleapis.com/chart chs=200×200&cht=qr&chl=https://cs87.salesforce.com/’& Id
- 1 https://chart.googleapis.com/chart : Is Google Chart API
- 2 chs: Height and width of QR Code
- 3 cht: Chart Type. We need to put qr for QR code
- 4 chl: QR Code will generate this text. (In our example I am putting URL of record)
Note: Please put your domain Url
instead of https://cs87.salesforce.com
Now Save your formula field and open any record. You can see a QR Code on record.
QR Code scanner App
available on Android Phone.
- Open the App and Scan your Code.
- It will show something like this.
- On Scanning QR code, it will redirect you to below screen :
- Click on the generated link on the bottom of the screen. It will redirect to record.
I hope, this blog would help you understand QR Code.