Loading

Salesforce Platform Flow: Create Task When Opportunity Checkbox Is Checked

Julkaisupäivä: Aug 19, 2026
Kuvaus

Some companies want a Task automatically created for the Opportunity owner when a specific checkbox field is checked on an Opportunity record. This can be accomplished with a simple Record-Triggered Flow on the Opportunity object in Salesforce.

Ratkaisu

This solution shows how to use a Record-Triggered Flow on the Opportunity object to automatically create a Task when a checkbox field is checked — for example, notifying the Legal team when a "Legal Review Required" box is marked on an Opportunity.

Scenario: When a sales rep marks the "Legal Review Required" checkbox on an Opportunity, a Task is automatically created for the Legal team.

The breakdown of the Flow is as follows:

Create a Field

  1. Go to Setup.
  2. Navigate to the Opportunity object in Object Manager.
  3. Under Fields & Relationships, create a new field.
  4. Set the Data Type to Checkbox and name the field accordingly.
  5. Set the Default Value to Unchecked.
  6. Click Next, and select the Profiles to grant edit access to this field.
  7. Click Next again and select the page layouts that should include this field.
  8. Click Save.

Create a Flow

  1. In Setup, use Quick Find to search for Flows and select it.
  2. Click New Flow in the upper right corner.
  3. Choose Record-Triggered Flow, then click Create.
  4. Set the Object to Opportunity.
  5. Set the Flow to trigger when a record is updated.
  6. Set the Entry Condition Requirements to "All Conditions Are Met (AND)."
  7. Select the entry conditions shown below.

Table with details

  1. Set "When to Run the Flow for Updated Records" to "Only when a record is updated to meet the condition requirements."
  2. Optimize the Flow for Actions and Related Records.

Create an Element: New Task Action

  1. Under the Start Element, click the + to add a new Element.
  2. Search for the New Task action.
  3. Give the action a meaningful Label and Description.

  1. Set the Assigned To ID to `{!$Record.OwnerId}`.
  2. Set the Due Date Only to `{!$Flow.CurrentDate}`.
  3. Set the Name ID to `{!$Record.ContactId}`.
  4. Set the Related Record ID to `{!$Record.Id}`.
  5. Set the Subject to anything desired for the Task.
  6. Click Done.

Create an Element: Update Triggering Record

  1. Under the Start Element, click the + to add a new Element.
  2. Select the Update Triggering Record option.
  3. Set the Label to "Un-Check Box on Opp" and give the Element a meaningful Description.
  4. Set the field to update to the "Legal Review Required" checkbox, with its new value set to unchecked (False) — this resets the box so the Flow doesn't fire again for the same record.

Save and Activate the Flow

  1. Click Save at the top of the screen, and give the Flow a meaningful Name and Description.
  2. Click Debug and test the Flow as needed.
  3. Once tested, Activate the Flow.

Result

The completed Flow shows two Elements connected to a start element, with an end element at the bottom.

 

Knowledge-artikkelin numero

000396746

 
Ladataan
Salesforce Help | Article