function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ross McLeod 3Ross McLeod 3 

Deployment Via VS Code

Hi 

Hope to pick all your brains about how best to deploy all changes from a scratch org to sandbox and production.

We have a team of three developers each using VS Code and the Salesforce CLI to do coded development and Sys Admin configuration. The plan is for each developer to create a scratch org and a new branch per sprintthen at the end we merge sprint branches to a deployment branch and put that into the Test Environment. We would then start the next sprint by creating a new branch from the merged one so that we all have each others changes.
  • We have set up Dev, Test, UAT, and production environments*
  • We have then created scratch org and installed relevant packages
  • Any code is pushed from VS code to the scratch org
  • Any declarative dev including flows, page layouts, custom objects and fields, permissions and profiles are done in the scratch orgs, these changes are then pulled back to VS Code
  • We are then committing our changes to our Git Hub Repository
  • The branches have then been merged together to the deployment branch
  • When deploying we are using SFDX force:source:deploy command
What we have found when deploying is that there are some issues with the following not being included when pulling back from scratch org:
  •  Changes to profiles 
  • Changes to Page layouts
We have checked the Force.Ignore and Git.Ignore files and can't see anything obvious blocking this sort of change.

The really strange thing is that if we clone a profile that isn't pulling through and it will then pull through.
  • Are there limitations to what you can deploy via the CLI?
  • Can you deploy all configuration from Scratch Org to Sanbox including profiles, page layouts permissions

Any insights you might have in this would be much appreciated.

Many thanks

Ross
Diego Vasquez 11Diego Vasquez 11
Hi Ross,

For the deployment process I would recommend to check out COPADO DevOps platform https://www.copado.com
Regarding the issue you are having, have you check if all environments match the production licenses? Our platform team have had that problem before when we started to implement Salesforce in the company. Before we implemented COPADO, the process involved to create an XML package (usually with ANT) that will be review for code testing and then deploy to staging, UAT and Prod environments. In some instances, some elements as Reports and Dashboard folders needed to be created manually in the new environment to deploy the respective content. 
No layouts issues so far, but with profiles we decided to create few standard profiles for the whole company and managed user access through permission sets.

I hope this help in someway!

Best,
Diego