This pre-deploy error appears when trying to deploy a change without one of its required dependencies.
What triggers this error?
This error is triggered when Salto calculates a deploy plan, and identifies a new element which has a required dependency but that dependency does not exist in the target environment, nor is it part of the new deployment.
For example, a user may try to deploy a new Apex Class in Salesforce which uses some custom object, but that custom object is not part of that deployment and does not exist in the target environment.
When this error occurs, Salto will skip this element, and it will not be deployed if user decides to proceed.
You can see an element's dependencies by reviewing the "Depends On" tab in the element's view in Explore mode.
How can I solve this?
To avoid this error, make sure that your deployment contains all required dependencies. This can be easily done by reviewing the "Dependencies" tab in the Element Selection view.
When selecting elements for deployment or cloning, the Dependencies tab will always show the Required dependencies for the selected elements. Users also see an alert when trying to proceed without selecting a required dependency:
In order to avoid the "element contains unresolved references" error, make sure there are no unselected required dependencies before previewing a deployment.
What if I don't see my missing dependency there?
In case you get an unresolved reference, but the missing element doesn't exist in the "select elements" phase, it may be because the item was not fetched at all. This can happen when your fetch configuration excludes some items, or because of an ID collision which prevented some elements from being fetched (see more about this problem, and how to fix it, in this article).
โ