---
schema_version: "1"
id: bcf77d25b9312d4150a1aac5350c631d25ad4cbd5382241a3a14f397ac63cca3
title: Fix Read-Only Field Errors in Flow
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_considerations_readonlyfields_fix.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_considerations_readonlyfields_fix.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 32ae3a7ee9358f62fa6041c8266e359ae54bc8df79554a360a5c9127159fe3ec
description: Troubleshoot flows that try to update fields that the running user doesn't have edit permissions for.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Fix Read-Only Field Errors in Flow

Troubleshoot flows that try to update fields that the running user doesn't have edit permissions for.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

If a flow tries to update fields that the running user can’t edit and Filter inaccessible fields from flow requests is not enabled for your org, the flow fails. If your record variable includes read-only fields and you can’t grant your running users “Edit” permissions for those fields, remove the fields from the record variable. Set the field values individually in a Create Records or Update Records element or copy the writable field values into a new record variable.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note If the read-only fields in the record variable are populated by a Get Records or Assignment element, consider updating those elements so that they don’t populate that field at all.

## Copy Field Values from One Record Variable to Another

Record variables and record collection variables can have values set for fields that the running user can’t edit. However, you can use the writable values to create or update records with Create Records or Update Records elements. To do so, map the writable values from the original record variable into a new record variable.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
            <colgroup>
              <col style="width:50%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d240477e116">User Permissions Needed</th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d240477e116 ">To open, edit, create, activate or
                  deactivate a flow using all flow types, elements, and features available in Flow
                  Builder, including Einstein and Agentforce for Flow:</td>

                <td class="slds-cell-wrap" style="vertical-align:top;" headers="d240477e116 ">Manage Flow</td>

              </tr>
            </tbody>
          </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note You don't need to be an admin to have the Manage Flow permission. Ask your admin to add it to your profile or permission set.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note With record collection variables, use loops to map the field values to a new collection.

1. Add an Assignment element to your flow. Make sure that the flow runs this element after the original record variable has been populated but before the Create or Update element.
2. For each writable field in the original record variable, add a row.
    
    Variable—Select {!recordVar2.field}, where recordVar2 is the name of the new variable and field is the field on that variable.
    
    Operator—Select **equals**.
    
    Value—Select {!recordVar1.field}, where recordVar1 is the name of the original variable and field is the field on that variable.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)
    
    Note If you plan to reference the variable in an Update Records element, include the record’s ID in the new record variable. Although Id is read only, the flow uses the value to determine which records to update.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_example.png)

Example

You have a case record variable called {!myCaseVar\_all}. It stores values for some read-only fields, so you can’t use it in an Update Records element. Copy the fields that you want to update to a new record variable: IsEscalated and Status. Also, copy Id because it’s required for an update operation. Here’s what those assignment rules look like.

  
| Variable | Operator | Value |
| --- | --- | --- |
| {!myCaseVar\_final.Id} | equals | {!myCaseVar\_original.Id} |
| {!myCaseVar\_final.IsEscalated} | equals | {!myCaseVar\_original.IsEscalated} |
| {!myCaseVar\_final.Status} | equals | {!myCaseVar\_original.Status} |

The same example works for a record collection variable. However, because you can’t directly change the values of a collection variable, you use a loop. After the flow has iterated over every item in the original collection, it exits the loop.

![Screenshot of loop with two assignments](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/flow_sobjclone_coll.png)

- Using a Loop element, the flow passes each item’s values into a loop variable ({!myCaseLoopVar\_original}).
- For each iteration, an Assignment element copies the Id, IsEscalated, and Status fields from the loop variable to another record variable ({!myCaseLoopVar\_final}).
- The flow then adds the {!myCaseLoopVar\_final} variable’s values to a new collection. The second Assignment element includes this assignment rule.
    
      
    | Variable | Operator | Value |
    | --- | --- | --- |
    | {!myCaseColl\_updated} | add | {!myCaseLoopVar\_final} |

#### See Also

- [Create Records Element](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_data_create.htm&release=264.0.0&type=5 "Create or update multiple Salesforce or Marketing Object records by using a record collection variable. Create or update exactly one Salesforce or Marketing Object record by using a record variable or other values from the flow.")
- [Update Records Element](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_data_update.htm&release=264.0.0&type=5 "Identify Salesforce or Marketing Object records to update, and set the values to change in those records. To do so, use the IDs and field values stored in a record variable or record collection variable, or use specify conditions to identify the records and set the field values individually.")