Skip to main content

How-To Create QR Codes Easily in Salesforce (No-Code)

Have you ever been asked to generate a QR Code? Looked at integrating Bitly or Zapier or another platform and thought this was going to be a huge lift?! 

Well I've been where you have been and I've got a no-code solution that you can complete in two easy steps. 

See the Documentation here for more specifics
https://goqr.me/api/doc/create-qr-code/

Step 1: Add CORS Site

  1. Click on the COG Wheel on the top right of the page
  2. Select Setup
  3. Screenshot 2024-03-29 at 12.29.43.png
  4. Search for "CORS"
  5. Select "CORS"
  6. Screenshot 2024-03-29 at 12.31.18.png
  7. Click on "New" button
  8. Screenshot 2024-03-29 at 12.31.54.png
  9. Enter in the Origin URL Pattern: https://api.qrserver.com/
  10. And click the "Save" button
  11. Screenshot 2024-03-29 at 12.32.21.png

We do this step first to allow Salesforce to propagate the changes to allow this domain to work.

Step 2: Creating Custom Field

You can do this on any field, I will be showing how to do this on the Account Object.

  1. Click on the COG Wheel on the top right of the page
  2. Select Setup
  3. Screenshot 2024-03-29 at 12.29.43.png
  4. Click on the "Object Manager" tab
  5. Select or Search for the Object you want to create the new custom field on
  6. Screenshot 2024-03-29 at 12.38.49.png
  7. Click on the "Fields and Relationship" tab on the left
  8. Screenshot 2024-03-29 at 12.40.32.png
  9. Click on the "New"
  10. Screenshot 2024-03-29 at 12.41.34.png
  11. For the Field Type select "Formula
  12. Screenshot 2024-03-29 at 12.41.53.png
  13. Click "Next" button to proceed
  14. Enter a Field Label, Field Name, and select "Text"
  15. Screenshot 2024-03-29 at 12.42.25.png
  16. Click "Next" button to proceed
  17. For the Formula you will start with the IMAGE() function which will convert the QR Code returned by Google as an image on the page.
  18. IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=" + Long_URL__c , 'QR Code',240,320)
    1. You can hardcode the entire URL or use another field like we did below to generate a dynamic QR Code
  19. Screenshot 2024-03-29 at 12.43.51.png
  20. Click "Next" button to proceed
  21. Add this field to any permissions sets or profiles as needed and click "Next" button to proceed
  22. Add this field to any page layouts and click "Finish" to save the field. 

Viewing the QR Code

Now navigate to the Object that you just added the new field to and see the new QR Code. 

Screenshot 2024-03-29 at 12.53.28.png

Just note the Orange square won't show on your own QR Code.