Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Setting Up Claude Code for Salesforce Development: A Practical Guide

Описание и применение

После выполнения пошаговой инструкции разработчики могут безопасно использовать Claude Code для автоматизации задач Salesforce в песочнице, соблюдая правила и подтверждая команды.

Задача

Developers need a quick, secure way to use Claude Code with Salesforce, but must first install and configure several tools and interfaces.

Результат

After following the guide, developers can securely use Claude Code to automate Salesforce development tasks in a sandbox environment, with guardrails and command approvals in place.

Рабочий процесс

  • Install Node.js LTS from nodejs.org and verify with node --version
  • Install Salesforce CLI globally with npm install -g @salesforce/cli sf --version and verify output
  • Install Git and verify with git --version
  • Create a Salesforce DX project: sf project generate --name claude-sf-lab && cd claude-sf-lab && git init
  • Log in to sandbox: sf org login web --alias my-sandbox --instance-url https://test.salesforce.com
  • Set sandbox as default org: sf config set target-org my-sandbox
  • Test connection: sf org display and sf data query --query "SELECT COUNT() FROM Account"
  • Choose interface: (A) Terminal – install via curl or npm, run claude; (B) Desktop App – download, sign in, open Code tab, point to folder; (C) VS Code – install Salesforce Extension Pack, install Claude Code extension, open folder, sign in
  • Run connection-test prompt in chosen interface and approve commands
  • Create CLAUDE.md guardrail file with rules such as default org and no production target
  • Keep command approvals on and commit clean starting point with git add . && git commit -m "Initial Salesforce DX project"

Доказательства

Claude Code — Anthropic's agentic coding tool — can retrieve metadata, write Apex and SOQL, and deploy changes, all through the Salesforce CLI you already know.

Источник

Do this once. Every option below relies on it.

Источник

Run sf org display and tell me which org this project is connected to. Then run a SOQL query to count Accounts.

Источник

  • Дата записи: 2026-10-04T12:55:49.453Z