> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/displaying-a-record-as-a-qr-code.md).

# Displaying a record as a QR code

Turn a field value into a scannable QR code in each row of a screen flow Data Table, for example a link that opens the opportunity on a phone.

A sales manager walks through the open deals with the team on a shared screen. When someone wants to follow up on a deal from their phone, they scan the code on its row and the opportunity opens in the Salesforce mobile app or the browser. The Data Table draws a QR code from any field value; here the value is a link to the record.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FZals4KQGzPSjoRJ14mrQ%2Fdata-table-tutorial-displaying-a-record-as-a-qr-code-result.png?alt=media" alt="A Data Table of opportunities with a QR code in each row that links to the opportunity"><figcaption><p>Each row carries a QR code that opens the opportunity.</p></figcaption></figure>

## Before you start

* A field that holds the value to encode. To open the record, create a **Formula** field on Opportunity, return type **Text**, named `Record Link`:

  ```
  LEFT($Api.Partner_Server_URL_260, FIND("/services", $Api.Partner_Server_URL_260)) & Id
  ```

  It returns your org's address followed by the record Id, for example `https://yourdomain.my.salesforce.com/006...`.
* Any other text works too: an order number, an asset serial number, a website.

## Steps

{% stepper %}
{% step %}

### Get the deals

1. In Flow Builder, add a **Get Records** element. Label it `Get Open Deals`.
2. Set **Object** to **Opportunity** and add the condition **Closed** equals `False`.
3. Store **All records**, and choose the fields to store: **Opportunity Name**, **Stage**, **Amount** and **Record Link**.

The flow now holds a collection of open deals, `{!Get_Open_Deals}`, that the screen can display.
{% endstep %}

{% step %}

### Add a screen with the Data Table

1. After **Get Open Deals**, add a **Screen** element. Label it `Review Deals`.
2. From the components list, drag the Avonni **Data Table** onto the screen.
3. Give it an API name such as `DealsTable`, then click **Open Component Builder**.
   {% endstep %}

{% step %}

### Connect the collection

1. In the **Properties** tab, under **Data Source**, choose **Variable**.
2. Select the `Get_Open_Deals` collection.
3. Drag **Opportunity Name**, **Stage**, **Amount** and **Record Link** from the **Fields** panel onto the table.
   {% endstep %}

{% step %}

### Render Record Link as a QR code

1. In the preview, click the chevron on the **Record Link** column header and choose **Type Attributes**.
2. Set **Type** to **QRcode**.
3. Set **Size** in pixels, for example `80px`. A plain number is read as pixels.
4. Leave **Encoding** on **ISO 8859 1** for a URL. Switch it to **UTF 8** when the value contains characters outside that set, such as Greek or Japanese text.
5. Optional: raise **Error Correction** from **L** to **M**, **Q** or **H** if the code may be printed small or scanned from a distance. Higher levels recover more damage but draw a denser code.
   {% endstep %}

{% step %}

### Save and test

Click **Done**, save the flow and run it with **Debug**.

Each row shows a QR code. Scan one with a phone camera: it opens the opportunity after the user logs in to Salesforce.
{% endstep %}
{% endstepper %}

## Troubleshooting

<details>

<summary>The QR code is too large and the rows get very tall</summary>

The row grows to fit the code. Lower **Size** (for example `60px`) or give the column a **Fixed Width** so the table keeps its layout.

</details>

<details>

<summary>The scan opens a page that does not exist</summary>

Check the value of **Record Link** on one record: it must start with `https://` and end with the record Id. If you encode a relative path such as `/006...`, the phone has no address to open.

</details>

## Related tutorials

* [How to add images on the Data Table](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/how-to-add-images-onthe-data-table.md): show a picture from a URL field.
* [Displaying the record name as a link](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/displaying-record-name-field-as-a-link.md): open the record from a click instead of a scan.
* [Learn the Basics](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/learn-the-basics.md): the screen, the columns and the selection, step by step.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/data-table/displaying-a-record-as-a-qr-code.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
