How to edit records inline in Salesforce related lists
The Inline edit in related lists for Salesforce template puts a pencil on every field of a record page's related lists, so you can change a stage or a phone number without opening the record.
Asked for since 2007Salesforce IdeaExchange ("Inline Editing for Related Lists"), opened , 90,180 points from 9,040 votes.
In Lightning, the related lists on a record page are read-only: to change an opportunity’s stage from its account, you open the opportunity, edit it and come back. The Inline edit in related lists for Salesforce template puts a pencil on every field of the related-list cards. Click one, change the value, and it is saved through Salesforce’s own save, as you, in your own browser.
Steps
- In Skins Studio, open Explore, pick Inline edit in related lists for Salesforce and click Create App.
- Open a record page in Lightning, such as an account. Open the Skins side panel from the browser toolbar. The skin is listed under On this page.
- Switch it on. A pencil appears next to each field in the related lists (Contacts, Opportunities and the others on the page).
- Click a pencil. A picklist opens as Salesforce’s combobox, and text, number and date fields open as an input. Pick or type the new value (Enter saves, Escape puts it back). The record saves, and Salesforce’s toast confirms it.
What you get
- A pencil on every field of the related-list cards on a record page, the same pencil the record’s own fields have.
- Picklists open with their values in order and the current one ticked. Text, numbers and dates open as an input.
- The save is Salesforce’s own save, done as you: the value, the saving state and the “was saved” toast, without leaving the page.
Limits
- It saves as you. Your field permissions, validation rules and required fields apply exactly as on the record itself. A field you can’t edit there has no pencil, and a save that a rule rejects shows Salesforce’s own error.
- It edits the fields the related list shows. To change a field that isn’t on the card, add it to the related list in the page layout, or open the record.
- Lookup and rich text fields keep Salesforce’s own edit: open the record to change them.
- Flows and triggers run as they do for any save, so a save can change other fields as well.
For developers
Salesforce’s UI API update endpoint (PATCH /services/data/v62.0/ui-api/records/{id}) answers 401 to the browser’s Lightning session, so the skin can’t save that way. Instead it calls the same Aura action the record page uses for its own inline edit, RecordUiController/ACTION$updateRecord, with the request context of the page you are on. It sends {recordId, recordInput: {fields}} and reads the saved record back from the response. Nothing is stored, and no session or token leaves the tab.
Other options
- Open the record: edit it on its own page, then go back to the parent record.
- List views: an object’s list views support inline editing. A list view filtered to one account gets close to a related list.
- AppExchange components: some related-list components add inline editing. An admin installs them and adds them to the page layout.
- Ask Salesforce: upvote the idea. Its status is Open.