Standard Fields can't be retrieved (supported by SFDC)
Hi Scott,
I noticed that standard fields, e.g., picklists, can't be retrieved in IC. However, this is supported by Salesforce.
Here's an example of package.xml that works:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Account.AccountSource</members>
<name>CustomField</name>
</types>
<version>37.0</version>
</Package>
Can you have a look please?
Thank you.
Kind regards, Petr
Comments (9)
-
repo owner -
reporter Hi Scott,
The use case is to migrate added picklist values. I add these values via Salesforce setup and normally would retrieve the field and submit the source code into VCS for the build server to push it to a next org.
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_unsupported_types.htm says that "Standard fields that aren’t customizable, such as autonumber fields or system fields" are not supported. However, this doesn't apply to standard picklists, because you can adjust them in setup and retrieve via ANT. I'd expect that deploy would work too:-)
-
repo owner Gotcha! That helps, Petr. Thanks for the supporting link as well. Let me take a look at what I can do address this gap for you.
-
repo owner - changed version to 1.7.8.0
-
repo owner - changed status to resolved
I'm pretty sure that the primary motivation for this has been resolved in 1.7.8.0 with support for
StandardValueSet
in the IDE. Please let me know if it's still not providing what you need. -
Hi,
sorry to warm up this old issue again, but I am new to Salesforce and we are working with IlluminatedCloud.
But I have no idea how I would achieve autocomplete for picklists? How would I retrieve picklists or global value sets with Illuminated and use them inside of IntelliJ?
Inside the OfflineSymbolsTables picklists are just “strings” as I see. Do I need to add them manually to the package.xml or how would I get something like an java enum that provides me with the values inside of the IDE?
Kind regards
Malte -
repo owner Malte, Apex doesn't support a concept of a compile-time constants for picklist field values, though in the open source project
sirono-common
we did add a nice facility for creating enum-style wrappers for picklist fields for exactly that reason. However, IC2 does support code completion for known picklist field values via smart completion (Ctrl+Shift+Space):Here's a demonstration:
https://youtu.be/jstM0sDfYNs?t=527
Hope that helps!
-
Great, thank you for your answer!
-
repo owner - changed component to Metadata Deployment/Retrieval/Removal
- Log in to comment
Hi, Petr. You're correct that right now IC doesn't allow retrieval of standard/system fields, only custom fields, nor does it allow retrieval of standard/system SObjects, only customizations to those SObjects (custom fields, validation rules, layouts, etc.). The rationale is that if you were to retrieve that metadata, you wouldn't be allowed to deploy it because it's considered immutable. Do you mind elaborating on the use case for retrieving standard/system metadata? I'm not staunchly opposed to adding it, but I'd like to understand how it would be used so that it doesn't cause a side-effect of failed deployments.