How to Create a Note with Salesforce Flow

In this Salesforce tutorial, we will learn about creating a Note with the help of Salesforce Flow in Lightning. To do that, we will first create a screen flow with a note and then embed that flow on the record page.

Note in Salesforce Flow

In Salesforce flow, Note is basically a record type that contains and shows data related to the records of Account, Contacts, and Opportunity.

A Flow with a Note record contains information and is linked to another Salesforce record, providing a convenient way to document and manage additional details and context related to that record.

While working for an organization that uses Salesforce as a CRM tool to track and manage customer data, I had to create a Note with flow for the account records.

The Sales support team needed this so that when a customer faces any issue with the services, the customer can address and raise the issue with the help of these Notes. This problem can be solved by creating a Note using Salesforce Screenflow.

In the below steps, I will explain the solution for creating a Note using a flow with Salesforce flow builder.

Create a Note with Salesforce Flow in Lightning

To create a Note with Salesforce Flow, we first need to create a flow with a note variable, and for that login to your Salesforce account and follow the steps below.

1. On the Setup page of Salesforce Lightning, go to the Quick Find box and search flow. From the options in the dropdown select Flows under the heading Process Automation.

Create a Note with flow

2. In the Flows window, click on the button New Flow that is on the upper right side of the screen.

Create a Note with Salesforce flow in Lightning

3. Select the option Screen Flow because this flow is efficient for passing quick actions like Notes. After selecting the flow type, click on the Create button.

Salesforce Lightning Create a Note with flow

4. Since we are creating a Screen flow, we need a variable to capture the record on which the Screen flow is executed.

To create a variable, click on the toggle icon on the upper left side of the screen, and under the heading Manager, click on the button New Resource.

Create Flow for Notes in Salesforce Lightning

5. In this step, we have to fill in the required details to create a new resource for the flow.

  • In the Resource Type field, click on the dropdown arrow and select Variable as a resource type.
  • In the API Name field, enter the API name starting with a small lettercase. For example, I have entered the API name as recordId.
  • In the Data Type field, click on the dropdown arrow, and from the options in the dropdown select Text.
  • Under the heading Availability Outside the Flow, activate the checkbox Available for input.
  • After making the above changes, click on the Done button.
New Resource to Create a Note with Salesforce flow

6. To add a screen to the flow, click on the “+” (add element) icon in the flow to add an element. As we click on the add element icon it will open a list of elements. There, select the option Screen under the heading Interaction.

Create a note with flow in Salesforce Lightning

7. Add label and API name for the screen. For example, I have entered the label as Sales Support Questions.

Salesforce Lightning Create a Note with Screen flow

8. In the same window, go to the Components section on the left-hand side, and from there, drag and drop the component Long Text Area to the screen region.

See also  Record Sharing Using Salesforce Flow | Create Custom Record Sharing Logic Using Salesforce Flow

Enter the Label and API name for the text area component.

I have added this component as a Question Note, so I have entered the text “What issue are you facing today?” as a Label.

At last, click on the Done button to apply the above changes.

Add screen to Create a Note in Salesforce flow

9. In the screen flow, click on the “+” (add element) icon, and from the options, select Create Records element.

Create a Note with Salesforce flow in Lightning

10. Enter the below details for the Get record component.

  • In the Label and API Name for the Create Record component.
  • Activate the radio button Use separate resources, and literal values under the heading How to Set Records Fields.
  • In the Object field, select Note object.
  • In the section Set Field Values for the Note, select the Field as Title and assign Value relevant to the note. For example, I have entered Value as Sales Support Notes.
Salesforce Create a Note with flow in Lightning

11. In the same window continuing the previous step, click on the button Add Field and select the new Field value as Body. Click on the Value label of this field and then select New Resource.

Add Record to create a Note in Salesforce Lightning

12. To define this New Resource, first select the Resource Type field as Text Template. Enter the API Name field without any space for example, I have entered the API name as SalesNotesTemplate.

In the Body section, click on the search bar. Insert a resource, select the Screen Component we have created in the beginning, and then click on the Done button.

Add template to Create Flow for Notes in Salesforce

As we click on the Done button in this New resource window, it will take us back to the Create Record window, and again, we will click on the Done button.

See also  How to Create an Email Template In Salesforce Flow

13. In this step, add another Create record component below the previous one.

Salesforce Add record to Create a Note with flow in Lightning

14. Enter and select the details below for the create records component.

  • In the Label field, enter the Label for this note record. For example, I have entered the Label as Related Note to Account.
  • Under the heading How to Set the Record Fields section, activate the radio button Use separate resources and literal values.
  • In the Object field, enter the object name relevant to this related record; for example, I have entered as Content Document Link.
  • In the section Set a field values for Document Link, select Field as LinkedEntityId and field Value as recordId.
  • Add another field, select Field as ContentDocumentId, and set the Value of the field as NoteID from Create Note, which is generated from the previous create record component.
  • Click on the Done button after making the above changes.
Create a note to add with flow in Salesforce Lightning

15. Now we have completed the flow, and to save this flow, click on the Save button that is on the upper right side of the window.

Use Screen flow to create Notes in Salesforce

16. Enter the Flow Label and Flow API Name. For example, I have entered the Flow Label as Accounts—sales support. Last, click on the Save button.

Save the flow to add a note in Salesforce

Last, don’t forget to activate the flow so that it can be used. To activate this flow, click on the Activate button on the upper right side of the screen.

Activate a Flow to create note in Salesforce

Add the note flow to the Salesforce Lightning Record Page

To add the created note flow to the Salesforce Lightning Record Page, navigate to the Accounts tab (or object in which you have created notes) and follow the below steps.

See also  How to Update Contact Owners with Salesforce Flow

1. Navigate to the Accounts tab and select an account from the list. For example, I have selected Burlington Textiles Corp of America.

How to Create a note with Salesforce Screen flow

2. On the account record page, click on the settings icon, and in the dropdown menu, select the option Edit Page.

3. As we click on Edit Page, the record page will open in the Lighting App Builder, and here we will add flow to this Record page.

Go to the Components section on the left-hand side, select the component Flow, and drag it to the template region of the record page.

Add Flow to record page to create note in Salesforce

4. On the right-hand side of the window, select the created flow in the Flow field. Then, to add the recordId, activate the checkbox Pass record ID into this variable.

After making the above changes, click the Save button to save the changes on the record page.

Add Flow on record page to create note in Salesforce

5. Now go back to the record page, and here, the screen flow will be visible. Enter the text in the text area, then click on the Next button.

Create a Note in object record with Screen flow in Salesforce

When we click on the Next button, a note is created, which we can view in the Notes.

Use Salesforce Screen flow to create notes

In this way, we can create a note in the Salesforce object record using the flow by following the above steps.

Conclusion

In Salesforce, Flows are useful in various automation processes that help streamline data management and simplify the task; by creating a flow to create notes, we do not need to create different custom fields to add notes on the record page.

In this Salesforce tutorial, we have learned the method to create notes with Salesforce flow. We created a screen flow and then added that flow to the account record page, from which it will be accessible to the users in the org.

You may like to read: