Video tutorials
/
Auto-Generate Barcodes & QR Codes in Salesforce Screen Flows with Avonni: No Coding Needed
Screen Flows

Auto-Generate Barcodes & QR Codes in Salesforce Screen Flows with Avonni: No Coding Needed

Generate a barcode or a QR code from a record field in a screen flow, then show it on the record page.

Beginner
6:52
Tutorial
Auto-Generate Barcodes & QR Codes in Salesforce Screen Flows with Avonni: No Coding Needed
Play video
Chapters
0:00 Introduction & Final Result 0:35 Creating a screen flow 0:50 Creating a recordID variable 1:20 Adding a Get Records collection 2:15 Adding a Screen Element 2:44 Configuring the Avonni Header 3:35 Configuring the Avonni BarCode 5:15 Adding our flow on a record page using App Builder
Click a chapter to jump to it
Watch on YouTube

What you will build

Build a screen flow that turns a field value into a barcode or a QR code and shows it on the record page. For Salesforce admins who need scannable codes without writing code.

  • A recordId variable and a Get Records element for the current record
  • An Avonni Header at the top of the screen
  • The Avonni Barcode, set to generate a barcode or QR code from a field value
  • The flow added to a record page with Lightning App Builder

Transcript

0:00 Introduction & Final Result

Hello. So today I'm going to show you how to build this custom component in less than five minutes, using the powerful combo of Flow Builder and the Avonni Flow Screen Components library. So as you can see on this example, I have this barcode component that is tied to the product record page, and it's also tied to the product code. So if I'm changing the code of the product, it will automatically change the barcode generated here. So that's what I'm going to show you today, how to build that flow.

0:35 Creating a screen flow

So the first step, we need to create a new flow, and to create a Screen Flow. The first step here we need to do, it's really, to generate a barcode in Salesforce, we first need to create a

0:50 Creating a recordID variable

variable for the record ID, and this variable will act like, you know, our anchor, to really ensure that the barcode is really uniquely tied to the record ID. So New Resource, Variable, recordId, Text, and make this variable available for input.

1:20 Adding a Get Records collection

Next, we need to create a Get Records element to fetch the information from Salesforce. So let's say get product, and here I want to fetch only this specific product I am on the page of. So here let's say object, Product, and here, filter product records. I really want to filter by a specific product, and for the condition I need to add, for the field, Product ID will be equal to the variable, the recordId variable that is generated by Salesforce. Done. So here I just created the Get Records element to fetch, or to ask Salesforce to fetch, the specific product information based on the condition I just set up. Now let's add the Screen

2:15 Adding a Screen Element

element, and this is where the Avonni Flow Screen Components library comes into play. So screen for the label, and I want this screen to act like a custom component. So I don't want this, I don't want a Footer either. And now, because I just installed the Avonni Flow Screen Components managed package, all the Avonni components are there, available.

2:44 Configuring the Avonni Header

So the first component I want to drag is the Avonni Header, to create a consistent look and feel for my component. Header, open Component Builder to access all the Avonni Header properties. Product barcode, that's the title. You can even add a caption. You can feel this join to have like this little border prune to boundary. Avatar: we can add an icon. Let's add this icon right there. So I just set up my Header, and again, from the screen element, the

3:35 Configuring the Avonni BarCode

next component I'm going to add, it's the Avonni Barcode component. So that's where it will generate the barcode here. So good. Open Component Builder. So the barcode I want to be generated will be based on the value, and the value should be, and will be, dynamic, based on the specific record ID I'm on the page of. So here, instead of typing the value manually, I can click here, Mapped, and map that value to any specific field from the product page. So I have my get product Get Records element, and here I can say, okay, generate the barcode for the product code field. Barcode type: as you can see, we support all types of barcode. Choose the one you need to use. For this example I will use this one, Code 128, to generate the barcode. Okay, so the barcode will be generated based on the value I have on the product code field. If you want, you can also customize the login field, background color, color, text color for the barcode. Done, and save. Now I'm pretty much done. Okay, and we're saving the flow, activate that flow. So now the next step will be to add this flow on the record page. Let's do that.

5:15 Adding our flow on a record page using App Builder

So from this record page, the product record page, I want to add my custom component, which is a flow, right here. So for that I need to go on the App Builder, Edit Page, and from the App Builder I just need to drag the Flow component, and then from there I will just associate the correct flow. One extremely important step here, it's really to check this, Pass record ID into this variable, otherwise it won't work. So you need to make sure that you're passing the current record ID variable into the flow. Save, and let's get back to the page to see the final result. Boom, it's there: product barcode, with the current barcode generated. If I'm changing or editing the barcode, let's say, okay, let's do this, one, two, save, it will automatically refresh the barcode based on the current value on the page. So that's pretty much done. In less than five minutes I just created this barcode generator on my product page, and you can for this exact same state to reproduce this for any of the objects you have answers to generate a barcode. That's how you can use the Avonni Barcode component in your flow. If you have any questions, comments or feedback, leave them in the comments below. Thank you.

Show the full transcript

Questions this video answers

How do I generate a barcode from a Salesforce field in a screen flow?

Add the Avonni Barcode component to the screen, click Mapped on its value and map it to a field from your Get Records element, such as the product code. Then pick the barcode type, for example Code 128.

Does the barcode update when the record changes?

Yes. The value is mapped to the field, so when you edit the product code and save, the barcode on the page is regenerated from the new value.

How do I show a screen flow barcode on a product record page?

Create a recordId variable available for input, filter your Get Records on Product ID equals recordId, then in the App Builder add the Flow component and check Pass record ID into this variable.

See it as a use case
No items found.
Build it in your org

Free in sandboxes, 10 free production licenses.

Start free
Keep going

Related tutorials

Find your next tutorial

Browse the whole library, filtered by where it runs and what you want to build.

All video tutorials