While working as system administrator in an organization that uses Salesforce for customer management, I was tasked with printing basic contract details. But there is one twist: each detail must be a new line.
So, I have found that Salesforce provides a function named “BR” that inserts a new line.
In this tutorial, we will learn how to break a line using the BR() function in Salesforce. In addition, we will discuss the syntax of the BR function in Salesforce and provide some real-world business examples.
What is the BR() Function in Salesforce?
In Salesforce, the BR() function is one of the text functions used to perform text operations. This BR() function is to insert an HTML break tag in string formulas.
In addition, to this keep one thing in mind to use the & or + concatenation operators to surround the BR(). And also this function should not be used in mail merge templates, S-controls, and reports.
Below is the syntax of the BR function in Salesforce:
BR()
- Here, we don’t pass any value to the parentheses it remain blank.
Let’s look at the scenarios for a better understanding of the BR function.
As I have discussed, I got the task of printing some basic details of the contract. So, here is the function base formula based on the BR function.
"Contract Name:" & Name & BR() "Contract Term:" & ContractTerm
With this, we have learned the syntax of the BR() function with real-life based examples. Now, we will proceed and learn how to use the BR function in Salesforce Lightning.
Use the BR() Function in Salesforce
Below are the steps to use the BR function in Salesforce Lightning to break a line:
- Open Salesforce Lightning mode. Next, click the “Gear Icon” in the top right corner of the page. Click “Setup“ from the dropdown menu to continue.

- The setup page opens when you select the Setup option. Here, the “Object Manager” is found in the Navigation Bar next to the Home tab. Click on it.

- The object manager page opens when you click it. There are numerous objects seen here. Use the Quick Find search field to find the item on which we want to use the BR() function.
- Now, click the “Campaign” object to move to the lead object page.

- On the product object page, the “Field & Relationship” option is in the details section on the left. Select “Field & Relationship” from the menu.
- The field and relationships page is opened after selecting the field and relationship option. Click the “New” button at the top of the page.