Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFDX: Retrieve Source from Org command does not retrieve new files #1175

Closed
vignaesh01 opened this issue Mar 21, 2019 · 14 comments
Closed

SFDX: Retrieve Source from Org command does not retrieve new files #1175

vignaesh01 opened this issue Mar 21, 2019 · 14 comments
Labels
type:feedback Feedback for new features

Comments

@vignaesh01
Copy link

vignaesh01 commented Mar 21, 2019

Summary

I pulled a sandbox using Salesforce CLI extensions for VS Code using sfdx : Retrieve Source in Manifest from Org command. Later when I right clicked on classes folder and selected SFDX: Retrieve Source from Org command, new classes created in sandbox recently does not get retrieved. Only the classes that are already present in the classes folder gets updated. Is this a known issue?

Command that runs:

sfdx force:source:retrieve --sourcepath d:\VS Code Workspaces\ENGAGE\uat\force-app\main\default\classes

###Steps to Reproduce

  1. Right click on classes subfolder
  2. select SFDX: Retrieve Source from Org command

Expected result

New files should get retrieved

Actual result

New files not getting retrieved. Only the existing files gets updated

@ntotten ntotten added the type:feedback Feedback for new features label Mar 21, 2019
@ntotten
Copy link
Contributor

ntotten commented Mar 21, 2019

This is behaving as designed. We only pull existing content, not new files. If you want to pull new files you should perform a retrieve using a package.xml that has either all apex classes or the specific classes you want to retrieve.

We do have some work coming soon that will make this process easier. See #862

@ntotten ntotten closed this as completed Mar 21, 2019
@DenverDoug
Copy link

September calling :) I know you guys have your hands full with the hard stuff, but just a heads up that this is NOT intuitive for people who don't live in the sfdx command line.
#1293

@mckennammj
Copy link

A whole new decade calling, any chance this new feature will be coming soon?

@sebbasim
Copy link

sebbasim commented Jan 8, 2020

How I do it:

  • Create a new project in vsc with the command palette (Ctrl + Shift + P) and use 'sfdx: create project with manifest'
  • Retrieve the code by right clicking package.xml under the manifest folder and select Retrieve source in manifest from org.

@mckennammj
Copy link

mckennammj commented Jan 8, 2020 via email

@sebbasim
Copy link

sebbasim commented Jan 8, 2020

If you know what files are new, you can specify this in the package.xml file and retrieve the code from your current project. No need to create a new project.

@leefranke
Copy link

How is this closed? Did you just give up fixing it?

Still does not work.

I have this in my package.xml

<types>
    <members>*</members>
    <name>ApexClass</name>
</types>

Version of VSCode:

Version: 1.45.1 (user setup)
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:27:35.169Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.17763

@mckennammj
Copy link

mckennammj commented May 18, 2020 via email

@leefranke
Copy link

I opened a new bug report. You can find it here:

#2204

@shukla-yogesh
Copy link

Most annoying tool developed. Developer has to scratch head on all these issues rather than focusing on the actual development. We all need the Eclipse IDEs back.

@hlemos-4c
Copy link

You have to right click on the manifest file package.xml and select the option there. Not on the specific folder classes (for example).

@zerkz
Copy link

zerkz commented Apr 14, 2021

This feature should NOT pull all apex classes just because you selected the classes folder. that would be a nightmare. What if you manage your apex classes across numerous projects?

@Nidhi-sfdc
Copy link

hey Peeps
So I was pretty annoyed and I started randomly retrieving stuff and it worked.. I can't pinpoint what worked but I can tell u

I minimized the project and used the retrieve command from right-click
I minimized the manifest and used the retrieve command from right-click
I minimized the package.xml and used retrieve command from right-click
also.. force-app\main\default and package.json
didn't wait for the completion of any just did things in random speed. was attempting it since weeks and had given it up.
had even created a new class and copy entire code from dev console and pasted and attempted to save and merge those by deleting it from dev console. it too worked

but retrieving this way was a success later for new files not showing up issue.

@smohyee
Copy link

smohyee commented Feb 22, 2022

This feature should NOT pull all apex classes just because you selected the classes folder. that would be a nightmare. What if you manage your apex classes across numerous projects?

I don't understand this comment.

If you're working across multiple projects, why would you have all the apex classes from different projects in one Apex Class folder?

You wouldn't. You'd have a separate folder hierarchy for each project, you'd connect to the appropriate org for that specific hierarchy/repo, and in that context you'd want to pull ALL apex classes from that org, not just the ones you already have in your repo.

What is stupid and unintuitive about the current design is that there is a command to retrieve ALL components of a specific type of metadata from a Salesforce org... but that command does NOT retrieve all the components, nor does it tell it didn't.

What is further stupid about this is that I now need to keep manual track of new metadata that I create, along with the API names so that I can retrieve them with specific command lines (or keep a package.xml manifest updated, which is even worse).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feedback Feedback for new features
Projects
None yet
Development

No branches or pull requests