I use IntelliJ with the Illuminated Cloud 2 plugin

Whenever I make a change in a class, I need to do "refresh metadata" to the class before making a change or the current code for that class will be overriden.

Is there a way to make automatic refresh before making a change in IntelliJ?

  • 7
    You need to start using separate scratch orgs (rather than collaborating on a single org where you will keep tripping over each other) and a VCS such as git (GitHub, GitLab, Bitbucket etc.) to manage the development process effectively. You could start learning on trailhead.
    – Phil W
    Aug 9, 2022 at 14:43
  • We use different scratch orgs but we also have dev org where we add our changes for testing after we finish the feature - is there a way for making an automatic refresh of a class before making a change?
    – Fgh999
    Aug 9, 2022 at 14:45
  • 5
    @Fgh999 The right tool for the job here, as Phil W pointed to, is git (A "Version Control System"), and the trailhead link he gave will get you started down the right path. With git, you can have multiple "branches", and you can make a specific branch for integrating everyone's changes together. Again, let the tool do the work for you, don't try to force a square peg (code versioning and integration) through a round hole (sfdx, vscode/IntelliJ). Your git repository should be your "source of truth" for metadata.
    – Derek F
    Aug 9, 2022 at 15:12

1 Answer 1


If you're using a common org for some part of your development process, IC2 includes first-class provisions for conflict detection. Please see the documentation on "Check for conflicts on deployment" here:


Pay particular attention to the difference between "Dedicated Logins" and "Shared Logins" to ensure that it's configured properly for the connection to the shared org.

Not the answer you're looking for? Browse other questions tagged .