Generate a QR Code from a record field


This guide provides an in-depth exploration of utilizing the QR Code component within Salesforce. This component seamlessly transforms any field from a Salesforce record into a QR Code. Whether you want to represent textual information, URLs, or other data types, this component enables the easy creation of QR Codes within your Salesforce environment, offering a versatile way to share and access information quickly and efficiently.

By following this tutorial, you’ll gain insights into configuring and implementing this component to meet your specific needs and enhance how you interact with data in Salesforce.


1. Create your screen flow

2. Create the record ID variable

The Record ID variable serves as a unique identifier for any record in Salesforce. It's a critical piece that allows for precise record manipulation within our flow, ensuring that we interact with the correct record at any point in our process.

Here's how to do it:

3. Create the Get Records collection

A Get Records Collection, essentially, instructs our flow to retrieve a specific set of records from our Salesforce object. By creating this collection, we allow the flow to gather the relevant data needed for our operations based on specified conditions - in this case, the current Record ID.

Utilizing the Record ID variable, we've previously created, we can set a condition that lets the Get Records element fetch the necessary data associated with the current Record ID. This ensures we're working with accurate and relevant data corresponding to the specific record.

4. Add your screen flow

Mapping the current record ID value

Assigning the QR Code value involves designating a specific record field whose data will be used to create the QR Code. We can establish a link between the Avonni QR Code component and the chosen record field by leveraging the mapped attribute.

The mapped attribute essentially acts as a bridge, linking the QR Code generator to the relevant record field. When the current record ID is processed, the corresponding record field value is automatically used to generate a QR Code.

5. Adding your flow on a record page

In setting up our flow within Salesforce, adding the flow to our record page via App Builder is a pivotal step. In this process, it's crucial to ensure that we select the correct flow we intend to display on the record page.

Another critical step is checking the box labeled "pass record ID into the variable". Enabling this option allows the record page to communicate with the flow, transferring the Record ID of the current record directly into our flow's Record ID variable. This ensures that our flow works with the correct record based on the page the user is viewing.

Last updated