Scenario:
Want to add 2 new features in org.
The process: (?)
- Open a 'Developer org' for each feature.
- In Github, create 2 new branches (each will connect to relevant Devorg).
- Then, when were done. Merge branches in Github & merge new files from "Devorg" to main org.
Is this the recommended process? Sometimes to init a Devorg can take hours..
Thanks in advance.
CodePudding user response:
No, not a good idea. Salesforce has some protection agains automated creation of Developer Editions and yes, it may take a while.
Read up about scratch orgs (like sandboxes but survive 30 days max), SF Devops Centre and "source tracking".
OK, think how many files you need to change and pull down from salesforce to Git whenever you add a new field to say Account.
It's never just 1 file. Account object, sure. What about page layouts. Maybe you need it on a listview. Maybe you need it in (custom) report type. Out of the box admin can see it but mortals need Profile / Permission Set changes too. If the field's required - you just broke a bunch of unit tests. It's never just 1 file.
SF can use this source tracking for you in scratch orgs and certain types of sandboxes.
See also https://stackoverflow.com/a/74239064/313628 (shameless plug)
https://developer.salesforce.com/blogs/2021/01/learn-moar-with-spring-21-sandbox-source-tracking https://admin.salesforce.com/blog/2022/learn-moar-in-winter-23-with-automatic-change-tracking