Loading

How to Set the Option 'Assign using active assignment rules' to True, Only When a Case or Lead is Created in Salesforce

Дата публикации: Nov 5, 2025
Описание

Learn how to set the 'Assign using active assignment rules' checkbox to true only on Cases or Leads on record creation.  This way, active assignment rules will not run again after a record is saved, and then edited.
 

Решение

In order to achieve this functionality,  set up an additional record type, page layout, and workflow rule per case/lead creation process. By following the below steps, every time a user creates a case/lead when a specific record type is selected, the 'Assign using active assignment rules' will be enabled by default on the case/lead creation page. As soon as that user saves the case/lead record, the workflow rule will trigger and that record will be assigned to the new record type and page layout where the 'Assign using active assignment rules' checkbox is disabled. This way, if the user edits that record again, it will not trigger the assignment rule and will stay assigned to the current record owner.


I. Create a new page layout


Classic

1. Click Setup.
2. Enter "Leads" or "Cases" in the Quick Find box.
3. Select Page Layouts.
4. Click New and at the 'Create New Page Layout' screen, select your existing page layout and specify the assignment rule checkbox differentiation. 
5. Click the 'Layout Properties' button on the palette and disable the 'Show on edit page' and 'Select by default' Case Assignment Check-box and click OK, then click Save.

Lightning Experience 

1. Click the gear icon.
2. Click Setup.
3. Click Object Manager.
4. Select Case or Leads.
5. Select Case or Leads Page layouts.
6. Click New page layout and at the 'Create New Page Layout' screen, select your existing page layout and specify the assignment rule checkbox differentiation. 
7. Click the 'Layout Properties' button on the palette and disable the 'Show on edit page' and 'Select by default' Case Assignment Check-box and click OK, then click Save.
4. Test and confirm that when a user creates a new case/lead, the 'Assign using active assignment rules' checkbox is set to true. Save the case/lead. Click Edit on the test case and confirm that the 'Assign using active assignment rules' checkbox is set to false.



II. Create a new record type


Classic:

1. Click Setup.
2. Enter "Leads" or "Cases" in the Quick Find box.
3. Select Record types.
4. Click New. 
5. At the 'Create New Record Type' screen, select your existing record type and specify the assignment rule checkbox differentiation.  
6. Select the Support Process / Lead Process, set it to active, and do not assign this new record type to any Profiles. Click Next.
7. At the 'Assign page layouts' screen, choose to apply the page layout we created in step 1 to all Profiles. Click Save.

Lightning Experience: 

1. Click the gear icon.
2. Click Setup.
3. Click Object Manager.
4. Select Case or Leads.
5. Select Record types.
6. Click New. 
7. At the 'Create New Record Type' screen, select your existing record type and specify the assignment rule checkbox differentiation. 
8. Select the Support Process / Lead Process, set it to active, and do not assign this new record type to any Profiles. Click Next.
9. At the 'Assign page layouts' screen, choose to apply the page layout we created in step 1 to all Profiles. Click Save.

III. Create a flow 


Lightning Experience 

Flow Setup

  1. Navigate to Setup and search for Flows.

  2. Click New Flow.

  3. Select Record-Triggered Flow and click Create.

  4. Configure the Flow:

    • Object: Select Case (or Lead).

    • Trigger the Flow When: A record is created.

    • Condition Requirements: Custom Condition Logic Is Met.

      • Condition : RecordTypeId Equals Case Creation - RUN ASSIGNMENT RULES (Use the ID of the Record Type created in Step II).
  5. Click Done.

Add the Update Element

  1. Click the + icon on the path and select the Update Triggering Record element.

  2. Label: Update Record Type to Standard

  3. How to Find Records to Update: Use the Case record that triggered the flow.

  4. Set Field Values for the Case:

    • Field: RecordTypeId

    • Value: Enter the ID of your desired STANDARD Record Type (the one you want the record to end up with, which is associated with the layout from Step I).

    • Tip for finding the ID: You can use a Get Records element before the update to find the ID of your standard Record Type by ID, or simply hard-code the 18-digit ID if you prefer the speed of an explicit value.

    • If you choose to use Get Records :

      • Add a Get Records element before the Update step.

      • Label: Get Standard Record Type ID

      • Object: Record Type

      • Filter: SobjectType Equals Case (or Lead) AND ID Equals [Your Standard Record Type ID]

      • Store: Only the first record, only the Id field.

      • Then, in your Update Triggering Record element, set the value of RecordTypeId to the ID retrieved from the Get Records element (e.g., Get_Standard_Record_Type_ID.Id).

  5. Click Done.

Save and Activate the Flow

  1. Click Save.

    • Flow Label: Case - Run Assignment Rules Only on Create

    • API Name: Case_Run_Assignment_Rules_Only_on_Create

  2. Click Activate.


IV. Test and confirm

Test and confirm that when a user creates a new case/lead, the 'Assign using active assignment rules' checkbox is set to true. Save the case/lead. Click Edit on the test case and confirm that the 'Assign using active assignment rules' checkbox is set to false.
Номер статьи базы знаний

000386582

 
Загрузка
Salesforce Help | Article