0

We need to refresh our sandbox but have some not deployed components in it (because not fully tested yet).

So with force plugin for Eclipse I was able to fetch components from sandbox and now have many Apex code files and XML files with components metadata (see screenshots).

To test the restoring of components (before refresh) I deleted a custom flow in sandbox (not needed anymore) and tried to restore it from Eclipse. Related XML file is SF2BO_installation-2.flow, I tried to save it to server (sandbox) but that doesn't store it in sandbox, just gives error "Save error: Required field is missing: actionType".

Other option seems to deploy to sandbox, but that won't connect to our sandbox.

So my question is: how can I restore a component with force.com plugin (or VSCode or sfdx CLI)?

Regards

enter image description here

  • Which API version are you using? Since API version 44.0 Flows are handled differently and no longer support version numbers in the name. This might be causing errors with saving it back. – Folkert Aug 13 '19 at 10:16
  • Can I set API version in force plugin? – Obi_77 Aug 13 '19 at 12:42
  • It's part of your package.xml. In any case, I would advice you to stop using Eclipse and start using other options, such as the plugin for Visual Studio Code, because support will stop soon. developer.salesforce.com/docs/atlas.en-us.eclipse.meta/eclipse/… – Folkert Aug 13 '19 at 13:09
  • I know. But I didn't find a way to connect VC to my sandbox, fetch components and restore them. It seems to involve command line: salesforcefactory.com/… Is there any good documentation for working with VC and sandbox? – Obi_77 Aug 13 '19 at 13:50
0

In general, You need to restore the dependencies first. For e.g. If you are restoring an apex class and you have referenced any object and their fields in that apex class. Before restoring the apex class, You need to make sure that you have restored the object and field first.

| improve this answer | |
  • sure, but I removed only the flow, so all dependencies should still be in sandbox. I don't see what field "actionType" is. – Obi_77 Aug 13 '19 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.