Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
10 votes
Accepted

I get this LF will be replaced by CRLF when using git-bash

This isn't an error, simply a warning that the files that will be committed are different than the files you saved. The default behavior for git on windows is to convert LF to CRLF, because some ...
sfdcfox's user avatar
  • 494k
9 votes
Accepted

Do deployments affect end users? (performance)

In Summer '18 we enforced "Compile on deploy" for all production orgs. This is explicitly designed to prevent impacts to end users when new Apex code is deployed. Previously, the first users ...
Daniel Ballinger's user avatar
6 votes
Accepted

How can I automatically detect if any deployment is running in a sandbox?

DeployRequest can be queried using Tooling API. When a deployment is running Status will be equal to InProgress. Below query can be used to understand if there is an in progress deployment against an ...
tugce's user avatar
  • 2,675
6 votes
Accepted

Need Suggestion : Release/Branching Strategy using bitbucket CI/CD

We can't answer what your best branching strategy would be. We don't know enough and that questions covers a lot of areas (git, branching, sfdx, deployments, metadata, etc). Likewise, it's highly ...
Kris Goncalves's user avatar
5 votes

Salesforce deployment using Ant and SFDX

The Ant-based Force.com Migration Tool and SFDX CLI are both clients of the Metadata API. You need one or the other, but generally not both, as both tools provide Metadata API deployment services. ...
David Reed's user avatar
  • 93.1k
5 votes
Accepted

CI/CD w/ SFDX: Where to store the jwtkeyfile in my repo?

A common strategy is to encrypt the JWT keyfile and commit the encrypted version to source control (perhaps under an assets directory). Then, you store the passphrase in a CI variable so that your ...
David Reed's user avatar
  • 93.1k
5 votes

Salesforce CI/CD: Only deploy changed elements and components

A "proper" CI/CD will deliver changes to dev orgs (note: Scratch Orgs or Sandboxes) using force:source:push. Delivery to a final package, or for QA/UAT should be through force:package:...
sfdcfox's user avatar
  • 494k
5 votes
Accepted

Salesforce CI/CD: Only deploy changed elements and components

Original Version The problem is that with multiple devs working on the code base. If a developer pushes a folder to the repo with changes to File A, and I come behind their commit with an entire ...
David Reed's user avatar
  • 93.1k
5 votes
Accepted

GitLab still recommended for Salesforce

Seems the specific trailhead you linked has been retired. In terms of Gitlab/Salesforce documentation, it seems the following Salesforce blog post related to when that trailhead was created contains ...
Kris Goncalves's user avatar
5 votes

CI/CD Benefits of using Scratch Org?

@zaitsman's answer - when you ignore a bit of the slightly sarcastic tone ;) - covers one of the core points of scratch orgs: cleanliness. By using a scratch org and always populating it initially ...
Phil W's user avatar
  • 36.7k
4 votes
Accepted

Salesforce CI/CD, from Change Set to SFDX with GitLab

The best place to start is Trailhead. Here are some cool stuff on it which can explore:- Build an Automated CI/CD Pipeline with GitLab Continuous Integration Using Salesforce DX GitLab + Salesforce: ...
sanket kumar's user avatar
  • 15.4k
4 votes

Insufficient access rights on cross-reference id when reverting a flow in CI/CD pipeline

Deleting a flow using automated CI/CD has always been tricky, here is a fairly detailed documentation for the possible cause. I would recommend you remove the flow you want to revert from your ...
Anmol Kumar's user avatar
  • 3,631
4 votes
Accepted

Package installation time is getting *drastically* vary, how to optimize it?

A given installation may only take a short amount of time, but you also need to keep in mind that a deployment/installation requires "exclusive" access to certain tables, which are made read-...
sfdcfox's user avatar
  • 494k
4 votes

Package installation time is getting *drastically* vary, how to optimize it?

It is all down to the fact Salesforce provides a multi-tenanted solution. Multiple orgs exist on the same virtual and physical servers. If there's heavy load on the server (across all the orgs that it ...
Phil W's user avatar
  • 36.7k
4 votes

CI/CD Benefits of using Scratch Org?

So their idea is very much for developers who are only developing features that are deployed and accessed form within SF UI/Rest API. Under this paradigm and in a traditional agile dev house, a ...
zaitsman's user avatar
  • 1,930
3 votes
Accepted

Salesforce Git Repository using VS Code

I recommend you check Salesforce CLI than the ANT migration toolkit. ANT migration toolkit requires some scripting while Salesforce CLI makes it easier as it provides a lot of utilities to make ...
Mohith Shrivastava's user avatar
3 votes

Salesforce Git Repository using VS Code

Ant isn't the preferred method in modern development. The new design uses Salesforce DX instead. There's a lot of blogs out there (like this one, not mine), plus tools like sfpowerscripts (again, not ...
sfdcfox's user avatar
  • 494k
3 votes

Is adding bots to an unlocked package supported?

As per the metadata coverage report, Bots can only be put in unnamespaced unlocked packages.
Phil W's user avatar
  • 36.7k
3 votes

Full validation in change sets still needed in unlocked package installation?

So far tests are not required for Unlocked Packages, however starting Winter '21, they will be required and run when you create a package version as explained here. You can currently validate the ...
Fabien Taillon's user avatar
3 votes

CI/CD with package.xml: how to deploy incrementally?

Script Level There's essentially a couple of steps involved to this process of doing a delta deployment. The first is to identify the changed components. If you're working with Git and GitLab ...
David Reed's user avatar
  • 93.1k
3 votes

What is the recommended tool to start CI/CD for Salesforce development?

WARNING: References to any specific technology is not a recommendation. Salesforce covers various common options in their documentation, including Jenkins and Travis CI. We happen to use Bitbucket as ...
Phil W's user avatar
  • 36.7k
3 votes
Accepted

How to know if a sfdx package is a second generation package (2GP)

First generation managed packages are not listed when using sfdx package commands since they are not associated with a dev hub. To see what 2GP packages you have, use: sfdx force:package:list To ...
Phil W's user avatar
  • 36.7k
3 votes
Accepted

Create UserTeamMember in test classes

For a scenario like this, you need to use a technique called dependency injection. There're a few ways to do this, but it'll require changing the live code a bit. The test itself can't create these ...
sfdcfox's user avatar
  • 494k
3 votes

Deal with Connected App Consumer Key changing on Refresh

Every time you refresh a sandbox, a new instance of your connected apps are created/installed. That's why your consumer key and consumer secret are changing. One thing we can take advantage of is that ...
Derek F's user avatar
  • 62k
3 votes

Sandboxes often reshuffles files like page layouts making it less git-friendly

One approach would be to mandate that when a developer makes a change and deploys/pushes that to their scratch org, that before committing they also do a retrieve. That will ensure that the ordering ...
Keith C's user avatar
  • 136k
3 votes
Accepted

get metadata as *.object, not folder structure

The new format you're experiencing is called "source format." This is a friendlier file format than the older monolithic file. However, if you still need it, sf project convert source can ...
sfdcfox's user avatar
  • 494k
2 votes

Deploy only modified metadata in GitLab to Org

The Unlocked Package design automatically performs delta updates. If you're using Unlocked Packages to manage your metadata, you don't have to worry about manually calculating deltas, deploying "only ...
sfdcfox's user avatar
  • 494k
2 votes

Setting up a pipeline through .gitlab-ci.yml file

Salesforce recently published examples and Trailhead modules around using GitLab Pipelines for Salesforce DX projects. The meat of the Pipelines setup is located here. The critical line is the first ...
David Reed's user avatar
  • 93.1k
2 votes

CI/CD w/ SFDX: Where to store the jwtkeyfile in my repo?

Store the JWTKey in a Repository variable. Run a bash command to create a file and store JWTKey from the Environment variable to that file. (Something like printf $JWT_KEY > server.key) Now, run ...
Abhishek Saxena's user avatar
2 votes
Accepted

Is there any Lightning Component Code Scanning Tool?

Lightning is "Secure By Design" (almost frustratingly so, in fact). As such, I'm not sure that there would be any demand for a scanner to detect "vulnerabilities." If you could find an actual ...
sfdcfox's user avatar
  • 494k

Only top scored, non community-wiki answers of a minimum length are eligible