Skip to main content

#Salesforce CLI6 personnes en discutent

Agentforce Builder fails right after naming the agent? Check your sandbox File Storage

 

The symptom

In a Developer sandbox, nobody could create a new agent in Agentforce Builder, admins included. You type the agent name, click next, and a red banner says the agent couldn't be created and to contact your Salesforce administrator. Nothing else: no error code, no detail.

We lost a few days to it, so here is what we found.

What we ruled out first

  • Permissions and licenses. It failed for every user, including System Administrators with the Agent Platform Builder permission set and license.
  • Org settings. Agent Platform and Einstein generative AI were both enabled.
  • Validation rules and triggers on User. None applied.
  • A CLI clue that pointed the wrong way. We reproduced the failure with sf agent publish authoring-bundle. The debug log showed a 404 from the agent authoring API, followed by a timeout on a sandbox fallback host. It matches an open CLI issue (forcedotcom/cli #3634), and we almost opened a support case over it. In our case it was not the cause.

The clue that mattered

Each failed attempt still created the agent's run-as user ("EinsteinServiceAgent User") and assigned its licenses and permission sets. Setup Audit Trail showed every step succeeding. So the failure happened later, when the agent itself was saved.

Then we checked the org limits:

 

 

sf limits api display -o <sandbox> | grep -i storage

File Storage: 248 MB used of 200 MB (124%).

One presentation file, a little over 240 MB, had been uploaded to the sandbox weeks earlier. Developer sandboxes allow only 200 MB of file storage. Once you're over the limit, the org refuses new files. We confirmed it by inserting a 1 KB ContentVersion, which failed with STORAGE_LIMIT_EXCEEDED. According to Salesforce Help, when data or file storage is over 100% in a sandbox, record creation can fail too, not just file uploads.

The timeline matched: the last successful agent save was before that upload, and every failure came after it.

The fix

  1. Find the largest files: 

     

     

SELECT Title, FileExtension, ContentSize, CreatedDate

FROM ContentVersion WHERE IsLatest = true

ORDER BY ContentSize DESC LIMIT 10

Download what you need to keep, then delete it from the org.

  1. Empty the Org Recycle Bin. Deleted files still count toward storage until the bin is emptied.
  2. Try again. With storage back under the limit, agent creation went through.

Clean up afterwards

Every failed attempt leaves an orphaned, active agent user, plus its permission set and license assignments. We had 12. Find them with:

 

 

SELECT Username, CreatedDate, CreatedBy.Name

FROM User

WHERE Profile.Name = 'Einstein Agent User'

ORDER BY CreatedDate DESC

Make sure no agent references them, then deactivate them.

Takeaways

  • In Agentforce Builder, a generic "couldn't create the agent" banner can hide a storage problem, not just permissions.
  • Developer sandboxes have small storage limits (200 MB data and 200 MB file storage). One large deck or recording is enough to hit the file limit.
  • Check sf limits api display early. It takes seconds and would have saved us days.

A note on certainty: we confirmed the root cause by removing it, since agent creation worked again right after the cleanup. We haven't seen it documented by Salesforce. If you've seen the same thing, please add it below.

 

 

 

#Agentforce  #Sandbox  #Salesforce CLI  #Storage Limit

0/9000
Rc Ex a posé une question dans #OAuth

Hello Salesforce Developers, 

 

I am using a Salesforce Developer Edition org and trying to authenticate Salesforce CLI using JWT Bearer Flow. 

 

I created an External Client App with JWT Bearer Flow enabled and uploaded my certificate. 

 

When I run the Salesforce CLI JWT authentication command, I receive this error: 

 

"External client app is not installed in this org" 

 

The External Client App exists in the same org, and the App Status shows Enabled. 

 

Org type: Developer Edition 

 

Username: 

rce23027@resourceful-panda-pvpcnl.com

 

 

My goal is to use Salesforce CLI for creating and managing a 2GP Managed Package. 

 

Could you please advise how to install/approve the External Client App or correctly configure JWT authentication? 

 

Thank you. 

 

#OAuth  #Salesforce Developer  #Salesforce CLI  #Developers Edition

1 réponse
  1. 7 oct., 23:22

    Hi, That message means the token request did not land on an org where this consumer is installed. Enabled on the app record is not the same thing. Check Distribution State in External Client App Manager. For a login in this same Developer Edition, it needs to be Local. A Packaged app is not usable for OAuth in the org where you created it, even when the status says Enabled. Flipping it back to Local often does not re-register the consumer. Create a new app and leave it Local from the start. The other usual cause is the CLI audience. login.salesforce.com is not a valid JWT audience anymore, and the CLI reports that as "not installed". Pass --instance-url with this org's My Domain URL from Setup, not https://login.salesforce.com. On the app, open Policies and set permitted users to Admin approved users are pre-authorized, then add the profile of the user you pass as --username. On Settings, keep JWT Bearer Flow on, with your certificate, and include the api and refresh_token scopes. Copy the consumer key again after you save, and wait a few minutes before you retry. For the 2GP work, enable Dev Hub in this org and log in as a user in that Dev Hub. The app has to live in the same org as that username.

0/9000

Hi Salesforce Community,

I need help recovering access to my Salesforce Developer Edition org for Salesforce CLI/VS Code.

I can currently access the org successfully in my browser and can use Setup, Reports, Objects, and other Salesforce features. However, I don't remember the password for this org.

When I use "Forgot Your Password?", Salesforce asks me to answer the security question, but I don't remember the answer. Therefore, I cannot complete the self-service password reset.

I need to connect this existing org to Salesforce CLI so I can retrieve my Salesforce metadata into VS Code. I do not want to create a new org because my existing RideNova project configuration is already in this org.

I can provide the required account/ownership information privately through an appropriate Salesforce support process.

Could someone please guide me on the official process for recovering the password or otherwise regaining CLI/API access to my existing Developer Edition org when I still have access to the org through my browser?

Thank you. 

 

#Developer Edition Org  #Salesforce CLI  #Metadata  #VSCODE

2 réponses
  1. 1 oct., 22:14

    If you can access the org already I'd just create a new System Admin user and use that to connect to your VS Code. Make sure to use a password manager to store these details for future reference. 

     

    When you're logged in as the new user you could run anonymous apex to force reset the password of your current user if you wanted. (You could probably do this step withotu creating the enw user, but at risk of accidentally locking yourself out I'd make sure you have a second user) 

     

    //Enter username of User to Change

    String username = '';

    //Set the new password

    String password = '';

    User u = [SELECT Id

    FROM User

    WHERE Username = :username

    LIMIT 1];

    Id userId = u.Id;

    System.setPassword(userId,password);

0/9000

 Introducing MetaDelta

: A Salesforce CLI Plugin Built for DevOps Teams 

 

As Salesforce DevOps engineers, we've all faced the same challenges:

 ❌ "Who modified this metadata?" 

 ❌ "What exactly was deployed?" 

 ❌ "Can I generate a package.xml only for what changed?" 

 ❌ "How do I audit Salesforce Core and Vlocity/DataPacks together?" 

 ❌ "How can I automate manual Salesforce Setup tasks?"

That's why I built MetaDelta, an open-source Salesforce CLI plugin focused on metadata auditing, deployment analysis, manifest generation, and manual task automation. 

🔍 Current Features

📊 Metadata Auditing

Identify metadata modified by a specific user within a configurable time window.

  •  Salesforce Core support 
  •  Vlocity / Industries support 
  •  User-based filtering 
  •  Change tracking across environments 
  •  Deployment investigation 

Perfect for answering:

📦 Smart Manifest Generation

Automatically generate deployment manifests from detected changes.

Supports:

  •  package.xml 
  •  package.yaml 
  •  Salesforce Core Metadata 
  •  Vlocity DataPacks 

Useful for:

  •  Hotfix deployments 
  •  UAT packaging 
  •  Release preparation 
  •  Partial deployments 

🔎 Deployment & Change Analysis

Analyze deployment activity and understand:

  •  What was deployed 
  •  When it was deployed 
  •  Which components were affected 
  •  Who performed the deployment 

A feature designed to reduce investigation time during incidents and release validation.

🤖 Manual Salesforce Setup Automation

One of the newest capabilities in MetaDelta.

Record and replay manual Salesforce Setup activities using Playwright-based automation.

Examples:

✅ Enable Salesforce features 

 ✅ Configure Agentforce settings 

 ✅ Navigate complex Setup pages 

 ✅ Standardize manual deployment steps 

 ✅ Reproduce setup tasks across multiple orgs

This helps transform traditionally undocumented manual activities into repeatable automation.

🎥 Record Once, Replay Everywhere

MetaDelta can:

  1.  Record manual Salesforce actions 
  2.  Generate executable automation scripts 
  3.  Replay them later across environments 

Great for:

  •  Sandbox setup 
  •  Release preparation 
  •  Environment standardization 
  •  Compliance processes

🎯 Built For

  •  Salesforce DevOps Engineers 
  •  Release Managers 
  •  Salesforce Architects 
  •  Vlocity / Salesforce Industries Teams 
  •  CI/CD Engineers 
  •  Enterprise Salesforce Programs

⭐ Why MetaDelta?

Most Salesforce tools focus on deployment.

MetaDelta focuses on:

✅ Understanding change 

 ✅ Auditing metadata 

 ✅ Generating deployment artifacts 

 ✅ Automating manual setup activities 

 ✅ Supporting both Salesforce Core and Vlocity ecosystems 

 

🔗 GitHub Repository

If you're interested in Salesforce DevOps, metadata governance, release management, or Salesforce Industries automation, I'd love your feedback.

MetaDelta GitHub Repository

⭐ Star the project if you find it useful.

Contributions, ideas, feature requests, and feedback are always welcome. 

 

 

Introducing MetaDelta: A Salesforce CLI Plugin Built for DevOps Teams As Salesforce DevOps engineers, we've all faced the same challenges: ❌

 

 

 

#Salesforce CLI  #Sfdx Plugins  #Salesforce Admin  #Devops  #Open Source Tool  #Release Management  #CICD

0/9000

Potential Fix for Flow Deployment Error with emailSimple / Send Email Core Action

I ran into an issue when deploying a Flow that uses the Salesforce Flow core action Send Email.

The deployment failed with this error:

Send_Email_to_Users (Action) - We can't find an action with the name and action type that you specified.

The action metadata looked valid:

<actionName>emailSimple</actionName>

<actionType>emailSimple</actionType>

However, the issue ended up being the versionString inside the actionCalls node.

In my sandbox, Salesforce generated the emailSimple action metadata with:

<versionString>3.0.1</versionString>

But in production, the same Send Email action was being generated with:

<versionString>2.0.1</versionString>

After changing the Flow metadata from 3.0.1 to 2.0.1, the deployment completed successfully.

Example:

<actionCalls>

<name>Send_Email_to_Users</name>

<label>Send Email to Users</label>

<actionName>emailSimple</actionName>

<actionType>emailSimple</actionType>

...

<nameSegment>emailSimple</nameSegment>

<offset>0</offset>

<versionString>2.0.1</versionString>

</actionCalls>

So, if you are seeing this deployment error with Flow Send Email / emailSimple, check whether the versionString value differs between sandbox and production.

This looks like an internal version mismatch for Salesforce’s emailSimple core action. The deployment error message does not directly identify versionString as the problem, so it can be easy to miss. 

 

#Salesforce Developer  #Flow  #Automation  #Metadata  #Deployment  #Salesforce CLI

0/9000

In this article we will look into detailed steps to setup Visual Studio Code as IDE for Salesforce code development.

How to Setup Visual Studio Code for Salesforce Development

1 commentaire
  1. 28 août 2025, 09:46

    Hi to Resoleve this issue just Unchek this in Vs Code Setting 

    Hi to Resoleve this issue just Unchek this in Vs Code Setting

     

     

0/9000

Salesforce Code Analyzer v5.0.0 is Now Generally Available (GA) 

 

Code Analyzer

 is completely free and helps developers scan and fix problematic code, acting as a unified layer on top of a range of open-source code scanning engines. It's now available across all key DX experiences: CLI, IDE, GitHub Actions and DevOps Testing!  

 

v5 now comes with:

  • 2 new engines: Flow Scanner and Regular Expressions
  • AI-powered quick fixes by Agentforce for Developers 
  • A single command to execute Code Analyzer
  • A brand new, highly polished HTML report
  • A completely new YAML configuration file
  • New integrations with DevOps Testing, GitHub Actions

Our VS Code extension v1.6.0 is also available with quick fix functionality that calls through to our Agenforce for Developers LLM.  

 

See our updated documentation here.

 

#Agentforce #Code Analyzer #Devops #Salesforce CLI #Github

0/9000

I've built a 2GP Package that I am trying to release as a Unlocked Package.

 

I've overcome various validation errors due to missing features or settings in my Scratch Org Definition file. 

 

However my package includes a Sharing Set which depends on the Contact being 'Private' and by default its 'Controlled by Parent', is there a way to define this feature/setting in my Scratch Org Definition File? 

 

@* Experience Cloud * @*Experience Cloud Developers* @Unlocked Packages  @Salesforce DX @* Salesforce Platform *

 

#Salesforce CLI #SFDX CLI #Salesforce Platform #Unlocked Packages #Unmanaged Package #Second Generation Packages #Scratch Org Definition #Experience Cloud #Experience Builder

2 réponses
  1. 4 déc. 2024, 14:18

    @Tom Bassett this might help you - https://salesforce.stackexchange.com/questions/218183/sfdx-sharing-settings-scratch-orgs

     

    Is your package ultimately intended for public consumption, or are you just using it internally with your own org(s)?  Deploying sharing-related settings on standard objects can be tricky because the destination org may have valid reasons for how sharing is configured on their standard objects and can't change to support your package.

0/9000

Resources from the Salesforce Developers Ask Me Anything on Summer ’24 Snapshots & Salesforce CLI

 

I hope you joined us for the fantastic SFDevsAMA on Wednesday 31 July 2024 hosted by @Charles Watkins and featuring product managers @Rohit Mehta and @Vivek Chawla. They loved answering your questions about the updated #Salesforce CLI and Scratch #Org Snapshot. If you missed it, don't worry - we recorded the series and our experts have provided some great resources that our experts for you to continue your learning! 

 

Still have questions? Post them in this thread for our experts!

 

#Ask An Expert #CommUpdates #CommUpdates#CommUpdates #SFDX CLI #DX Snapshots

1 commentaire
0/9000