Unable to add Apex class to project using "Retrieve Metadata"
OK, so this could really easily be user error, since I always find the behavior surrounding retrieve to be difficult to understand.
- I have a project with a traditional connection to a sandbox. Everything seems to be working normally.
- There is a class present in the sandbox that is not in my workspace.
- I have successfully used “Configure Module” to add that class to my subscription. There is a big fat check mark next to it.
-
I have tried running “Retrieve”, but no selection I make allows me to retrieve the missing class:
-
Contents = “Context” with the src directory selected, and the “Server Only” filter, shows no Apex classes;
- This puzzled me because I thought “Context” meant essentially, whatever component is currently selected, e.g., in the Project tool window; in which case I wonder why it isn’t called “Current Selection” instead of “Context”;
-
Contents = “Module ‘<Module name>’” with the “Server Only” filter shows no Apex classes;
- Both of the above continue to show no Apex classes even if the “Subscribed Only” filter is not set.
-
Can you please advise me on what I am doing wrong, or, in the case where my workspace state might have somehow gotten hinky, how I can reset it?
Thanks.
Comments (7)
-
repo owner -
reporter D’oh. Yes, that did resolve it. I must have updated the module config and refreshed from here in the wrong order or something. Apologies. There does seem to be quite a checklist of things to think about when trying to get new metadata into a project, and sometimes I do something in the wrong order. Thanks.
-
reporter BTW, am I right in thinking that “Context” kinda means “whatever is currently selected”, or is it more/less/different than that?
-
repo owner Context does mean what's currently selected, but if you select a folder it should show server-only metadata that would land in that folder.
This whole metadata manipulation topic is being documented for the user guide right now. I'm reviewing the chapter on metadata subscription management now, and once that's published the tech writer will be working on metadata deployment/retrieval/delete. I'm also actively working on some feature enhancements in that area both to fill gaps and to simplify the common use cases.
-
repo owner - changed status to resolved
Solved by refreshing the cached list of metadata.
-
reporter Great. I look forward to perusing the new documentation. Thanks.
-
repo owner - changed component to Metadata Deployment/Retrieval/Removal
- Log in to comment
Alan, what you describe should work. Have you tried clicking the Refresh toolbar button in the retrieve dialog? It should refresh automatically when your metadata subscription is updated, but just in case can you see if that helps?