Hi. Apologies if I wasn’t clear, but because of limitations in the Salesforce APIs for enumerating SObject fields — specifically MetadataApi.listMetadata() — standard fields aren’t explicitly listed for subscription or retrieval. They’re available for enumeration through another API, PartnerApi.describeGlobal(), that IC2 uses to create the OST, but that’s not IC2 uses to enumerate metadata objects for subscription management and for the bulk metadata deployment/retrieval/removal dialog. I could investigate including the standard fields from the other API, but I’m honestly not sure what level of support would be offered for them.
Anyway, that’s why you see them in the OST but not in the retrieval dialog or subscription editor. Instead, you can subscribe to/retrieve standard fields by subscribing to/retrieving the containing SObject type. So if you want Account.LastModifiedDate, you can retrieve Account.
Please let me know if that doesn’t make sense.
Regards,
Scott Wells
After a bit more tinkering, I’ll back off somewhat on my previous statement about adding standard fields to the list of those available for explicit subscription/retrieval/etc. It turns out that most of them are not actually valid for retrieval. That includes the lifecycle fields such as the creation/modification dates/IDs, the Id field itself, the Name field (which is configured in the main object metadata), etc.
If you retrieve the entire standard Account object, only 43 of 192 standard fields are retrieved with it, and the other standard fields cannot be retrieved. For custom objects, none of the standard fields can be retrieved.
I’m going to try to figure how to filter standard fields on standard objects for those that can be retrieved explicitly and add those to the list of fields for selection, but otherwise the gap is much, much smaller than originally thought.
Out of curiosity, what is it that you’re trying to do exactly that motivated this question initially? Perhaps that will help to contextualize it for me.
Regards,
Scott Wells
And coming back full circle, it turns out that listMetadata() does actually already include all standard fields that are valid for explicit subscription, retrieval, etc., so as far as I can tell, no changes are needed for IC2. I’m pretty sure that if you try to retrieve fields like Id, Owner, etc., in the VS Code Extensions’ Org Browser, it will either fail or just not do anything. If you find that not to be the case, please let me know as I’ll need to discuss exactly what’s happening with Salesforce since my attempts to retrieve those via both the CLI and the API have been unsuccessful.
Regards,
Scott Wells