by Salesforce
Update a record
Changes the fields you pass on one record, found by its ID, and leaves every other field as it is.
Updated Sep 27, 2026
update-record.md
Update a record
Changes the fields you pass on one record, found by its ID, and leaves every other field as it is.
Set up
Use the first option your agent supports.
MCP (official, remote)
Add this server to your agent's MCP settings, then sign in when asked.
{ "mcpServers": { "salesforce": { "url": "https://api.salesforce.com/platform/mcp/v1/platform/sobject-mutations" } } }
Call the MCP tool updateSobjectRecord.
Server URL: https://api.salesforce.com/platform/mcp/v1/platform/sobject-mutations
Note: An admin creates an External Client App and activates the server first. It never deletes records.
CLI (official)
Install the command and sign in with it, then confirm it runs.
npm install @salesforce/cli --global
sf --version
Run sf data update record.
Note: Sign in with sf org login web; sf org display then prints the instance URL and API version.
API (official)
- Base URL: https://{my_domain}.my.salesforce.com
- Endpoint:
PATCH /services/data/vXX.X/sobjects/{sobject}/{id}/ - Auth: an OAuth access token, sent as
Authorization: Bearer <token> - Docs: https://developer.salesforce.com/docs/platform/api-rest/guide/intro-rest.html
Note: {my_domain} is your org's My Domain name, and paths carry the API version as vXX.X; sf org display prints both as Instance Url and Api Version.
Before anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.