Loading

Salesforce Error: 'Can't change the data type because it's referenced in the following Flows'

Udgivelsesdato: Oct 21, 2024
Beskrivelse

When a field is being referenced in a Flow you will not be able to change the Data Type and will receive an error, "Can't change the data type because it's referenced in the following Flows".

Steps to Reproduce:

  1. Create a simple flow referencing a Custom Field in it. For example: Reference any custom field within 'Record Lookup' element. Refer to "Create a Flow" for details.
  2. Now try to change the Data Type of the Field, which is referenced in the Flow. For example: From Data Type "Text" to "Number"
  3. This will throw an error: "Can’t change the data type because it's referenced in the following Flows"

Note: Deactivating the Flow will not resolve the issue.

Løsning

This issue can be resolved only when the affected field is removed from the Flow.

NOTE: Deleting the entire Flow would also resolve the issue. However, to avoid re-creation of the complete Flow, you can follow the below-mentioned steps: 

  1. Go to the Flow being referred to in the error message.
  2. Search all elements to locate the affected field.
  3. Remove the same affected fields from the Flow.
  4. Save the Flow as a new version.
  5. Delete the older version where the field was referenced.

Now you will be able to change the Data Type of the affected field without any error.
 

Yderligere ressourcer

Vote and comment on the Salesforce Idea - Ability to Change Field Type of Field Referenced in a Flow

Trailblazer Community - Cannot change the data type of field

Trailblazer Community - Changing the data type of a field

Troubleshoot Flow Errors

Vidensartikelnummer

000387461

 
Indlæser
Salesforce Help | Article