Can I use SalesforceDX as a version control for an existing Eclipse project?

37
June 13, 2019, at 11:10 AM

I am looking to use Salesforce as a version control solution for my Eclipse Java project. So far, I have been unsuccessful at finding any information pertaining to this specific scenario. I have Eclipse Oxygen and a Maven Java project. I have all of the SalesforceDX necessaries installed such as SFDX CLI and VSCode Extensions. I am under the impression that this is possible, but there is next to no, if at all, supporting documentation online. I'd appreciate any help. If I figure it out myself, I will post the answer here.

I've looked in Trailhead for any modules that would teach me how to achieve this, but the only one I found is for scratch orgs. Google searches don't help. Perhaps the closest thing I've found is this:

https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli.htm

The problem with this one though is that it isn't really a walkthrough with steps. Instead it just explains the CLI commands.

Answer 1

Salesforce DX is not a version-control solution, and applies only to products that are built on or interact with the Salesforce platform.

You can use any off-the-shelf version-control solution (Git, Mercurial, SVN...) with your Eclipse Force.com IDE-based Salesforce project. However, it sounds like you are building a Java project in Eclipse, rather than a Salesforce product.

To be clear, Salesforce DX broadly can refer to number of pieces, which apply differently to applications built on, or built to work with, the Salesforce platform:

  • A development process based on ephemeral scratch orgs rather than persistent sandboxes, using source code (in version control) as the source of truth. Salesforce DX development processes use a somewhat different source code format ("Salesforce DX format") rather than the classic Metadata API source code you see in Eclipse.
  • The sfdx command-line tool, which facilitates the process above and interacts with scratch orgs and Salesforce DX-format source code, but also acts as a Metadata API client to perform deployments and supports other utilities.
  • The IDE built in Visual Studio Code with the Salesforce Extension Pack, which supports a Salesforce DX development process.

If you're building an application that interacts with the Salesforce platform, you can integrate Salesforce DX scratch orgs into your processes to serve as testing and QA environments for your code to interact with. However, this doesn't provide any version-control services.

If you're building a product that doesn't run on or interact with the Salesforce platform, Salesforce DX does not have much to offer you.

READ ALSO
Unit testing save methods when return type is void

Unit testing save methods when return type is void

Is there any way to write unit tests for save methods in DAO layer when return type is void? I'm using Log4j, Junit in spring boot project

52
Does this function rightly shuffle the first elements of a list into the whole list? [on hold]

Does this function rightly shuffle the first elements of a list into the whole list? [on hold]

I would like to transform a list partially shuffled (the first elements are not shuffled) into a fully shuffled list, I came up with this method, but I'm not sure that it produces a balanced shuffle, so the question is: is it the right way to do that?

52
Getting the max occurences of each individual number from a HashMap<Integer, List<Integer>>

Getting the max occurences of each individual number from a HashMap<Integer, List<Integer>>

I've been dealing with an exercise, in which I have to find a solution for the following problem: I have a

19
How to Read Specific Range value of an Object Property

How to Read Specific Range value of an Object Property

i'm new dealing with Ontologies and finding problems to get my GraphQL Query working , trying to read value of specific Object property that has multiple Ranges Object Property Screenshot

53