Comments (14)
It does sound like a useful feature. It may be a bit problematic though because vim plugin would have to parse and manipulate package.xml.
I had considered this feature some time ago but decided against because thought that the result is not worth the effort.
Perhaps I shall give it another thought now when I am not the only potential user of this feature.
Thanks for the suggestion.
from vim-force.com.
I don't think it would have to parse package.xml. It could just generate a temporary package.xml.
from vim-force.com.
Agreed. A temporary package.xml should do.
The ease of use of this function is of some concern however.
- If we were to use an instruction like
:ApexRetrieve object Account
then one would have to remember that - in order to specify that Account is an object - one has to use object term. Perhaps there should be some way to bring a list of metadata types to choose from. - Assume package.xml does not include
<name>CustomObject</name>
.
Consider a scenario:- retrieve Account with all fields using
:ApexRetrieve object Account
(remember we do not change existing package.xml and just use a temporary one, so<name>CustomObject</name>
does not get added into main package.xml) - amend a field (e.g. field label) on Account
- try to deploy updated field label (since .object does not have '-meta.xml' counterpart we have to use ApexDeployAll)
- retrieve Account with all fields using
the result is - SFDC complains that Account is 'Not in package.xml'
from vim-force.com.
A way of choosing the type of object would be good. If you're feeling ambitious, you could even show the actual objects using the Metadata REST API.
Maybe ApexDeployAll should also create a temporary package.xml with wildcards for all components, or perhaps just encourage the use of wildcards in the user's package.xml. Except when deleting components, I haven't found a reason to name individual components during a deploy.
from vim-force.com.
It is easy to retrieve a list of metadata type names (like CustomObject, ApexClass, etc) with salesforce library for Ant.
Maybe we could do something like:
- Retrieve complete list of metadata types into a text file and open it in vim buffer
- put some sort of mark (or just delete un-needed types) against types to be retrieved and add actual component names (indented under Type Name) like so:
CustomObject
+Account
+MyObject__c
CustomTab
*
ReportType
+MyReportType__c
You would still have to remember that in order to retrieve individual component it has to be specified with +
and in order to retrieve all components of a given metadata type (where it is allowed by Ant library) you have to specify *
So not sure how user friendly is this.
- Create a temporary package.xml and use it for "retrieve" Ant task to download stuff into a temp folder
- copy downloaded results into the actual Project folder
(Temp folder is needed to make sure that we do not mess with the main package.xml)
Potential issue with this is that we may end up bringing too many metadata files into the project and ApexDeployAll will no longer work because:
- some types (Like Profiles or Workflows) will cause error because Ant complains when you try to deploy Profiles (even if you have not changed anything)
- there is a limit on the number of files you can deploy in one go, so ApexDeployAll for a large project (e.g. lots of objects and fields) will fail due to this limit
from vim-force.com.
I have done a first stab at :ApexRetrieve
command.
For more details see :h ApexRetrieve
and this short video: http://youtu.be/M-XQCykF6nU
from vim-force.com.
Thanks, @neowit. This works, but it's a little painful for lots of objects. I'm trying to retrieve custom fields on Task, and I have 109 objects in the org, so stepping through all of them is time consuming. When I get past a screen full of objects, I get four -- More --
prompts before the Overwrite (Y)es / (N)o / all / (A)bort / (C)ompare
prompt.
How about showing a list of retrieved objects like the one you display to choose the type of object so you can tag the ones you want?
from vim-force.com.
Funny you should say that. I actually started the individual object selection part in September, but then run out of spare time and later abandoned it.
This issue is now reopened.
from vim-force.com.
FYI - if you pull current version then --More--
prompt should not bug you any more.
from vim-force.com.
Christian, I have pushed new version which supports selection of child components to retrieve. Parent being things like CustomObject, child things like Account.
Here is updated video: http://youtu.be/umO86ji2Iqw
I have not had a chance to use this functionality properly yet so It is probably quite buggy. Make sure to backup your project before testing and let me know if you find problems.
from vim-force.com.
Thanks, @neowit. The new :Expand
command works great.
from vim-force.com.
Christian,
Have you had a chance to test this functionality?
My day-to-day workflow does not require this functionality so I can not test it thoroughly.
Did you find any problems?
from vim-force.com.
I've used it a couple times. No problems so far.
from vim-force.com.
Good to know.
I will close this issue then.
from vim-force.com.
Related Issues (20)
- Cannot run scripts other than :ApexInitProject before running this script HOT 4
- [Question] Is it possible to check what org am I currently using? HOT 3
- [Question] Is it possible to know remote changes author? HOT 2
- Code Syntax Highlighting for files with extension `*.apxc`? HOT 1
- ApexRefreshProject do not download my new CustomSetting HOT 2
- can not run test for specific method HOT 2
- :ApexExecuteAnonymous: show some error for ~100 milliseconds HOT 3
- ApexTestWithCoverage open buffer with incorrect data HOT 3
- :ApexTest - is it possible to skip `Select Log Type to change`? HOT 1
- Auto-completion doesn't work HOT 7
- incorrect syntax highlight HOT 1
- Unable to refresh projects and files (Unexpected end-of-input) HOT 8
- Commands Fail Silently If Another Process Already Bound to Server Port HOT 3
- sfdx support HOT 1
- Unknown function HTMLIndent HOT 12
- Is there an option for force refresh of file. ApexRefreshFile doesn't support "!" like ApexDeploy! ? HOT 2
- Is ApexTListToggle deprecated? HOT 2
- ApexTestWithCoverage fails with below error. My Deploy/Refresh commands don't have any issues HOT 3
- Autocomplete is slow. HOT 2
- LWC support (in non-sfdx projects) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-force.com.