New Metadata like Fields and Record Types not found with SFDX
I want to retrieve a new field or record type that I created in the Org. The object was already loaded in the project.
- I right-click on the object or objects node in the Project window,
- Select IC->Retrieve Metadata.
- Change the Contents to ‘Custom’
- Only ‘Server Only’ checked. (I have also tried with both ‘Server Only’ and ‘Local+Server’.)
- Refresh/update the metadata list.
I expect to find the new field or record type under the object, but they aren’t listed.
My workaround right now is to either manually create the file to the best of my ability, or start an entirely new project to load the metadata file and copy it over to my project.
Comments (19)
-
repo owner -
reporter It has been happening since at least version 48. Was hoping it would be fixed by 50.
I’m looking for a record type called Default_Project on the Status_Note__c object. One bit of info, Record Types were not previously enabled on the Status_Note__c object prior to this retrieve attempt.
Attaching the log….
-
reporter - attached idea.log.zip
-
repo owner Thanks, Jason. Because of the verbosity of this logging, I'm probably going to need all
idea.log*
files from the span of time of the issue reproduction. The one that was attached is only the last small portion of it. Do you mind providing those as well? I'm fine taking allidea.log*
files and sorting through it myself if that's more convenient for you. -
reporter - attached AllLogs.zip
Here are all of the logs
-
reporter I don’t know if it means anything, but for this object, the .object file (Status_Notes__c.object) is just:
<?xml version="1.0" encoding="UTF-8"?> <CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"> <enableEnhancedLookup>true</enableEnhancedLookup> </CustomObject>
Other object files are far more detailed.
-
repo owner Jason, that seems to be missing
idea.log.2
. Is that file available? -
reporter - attached New_Logs.zip
I cleared them all out and started fresh.
-
repo owner Thanks, Jason. So I do see that being returned by the server:
2020-10-21 10:56:19,233 [ 37948] DEBUG - onfigCache.FilePropertiesCache - Evaluating for inclusion: { "createdById": "00570000003W0VHAA0", "createdByName": "Jason Curry", "createdDate": { "orig_year": 2020, "orig_month": 7, "orig_day": 2, "orig_hour": 4, "orig_minute": 2, "orig_second": 42, "orig_fracSeconds": 0.000, "orig_timezone": 0, "year": 2020, "month": 7, "day": 2, "timezone": 0, "hour": 4, "minute": 2, "second": 42, "fractionalSecond": 0.000 }, "fileName": "objects/Status_Note__c.object", "fullName": "Status_Note__c.Default_Project", "id": "0121F000001zv5FQAQ", "lastModifiedById": "00570000003W0VHAA0", "lastModifiedByName": "Jason Curry", "lastModifiedDate": { "orig_year": 2020, "orig_month": 10, "orig_day": 21, "orig_hour": 14, "orig_minute": 17, "orig_second": 6, "orig_fracSeconds": 0.000, "orig_timezone": 0, "year": 2020, "month": 10, "day": 21, "timezone": 0, "hour": 14, "minute": 17, "second": 6, "fractionalSecond": 0.000 }, "manageableState": "UNMANAGED", "type": "RecordType" } 2020-10-21 10:56:19,233 [ 37948] DEBUG - onfigCache.FilePropertiesCache - Including Status_Note__c.Default_Project.
Just so I'm 100% clear on the behavior that you're seeing, you don't see that record type in the subscription editor under the
RecordType
metadata type, e.g.:nor do you see it in the retrieval dialog (configured as follows) under
objects>Status_Note__c>RecordType>Default_Project
, e.g.:Is that correct? If so, I'll need to see what other type of debug logging to get from you since we know it's being returned by the API.
-
reporter Correct, it doesn’t show up in either place.
-
repo owner Jason, the first image I showed was in a different place. It's in the subscription editor which can be found in Illuminated Cloud>Configure Module. Do you see it listed there under the top-level
RecordType
metadata type folder? -
reporter Guess that last image is reportTypes, not record. Need new glasses.
-
reporter I checked under Configure Module and it is listed there and is checked.
-
reporter
-
reporter Got it to work, had to check ‘Subscribe by parent’
-
repo owner Ah, okay...good. That helps to isolate the location of the particular issue. We now know that it's properly enumerated via the API, and it's properly included in the subscription editor. It seems to be an issue with the build options dialog used for retrieval/deployment/removal. Since it's part of your subscription, does it appear if you check Subscribed Only under
objects>Status_Note__c>RecordType>Default_Project
? If not, I'll need you to get some debug logging for the construction of the tree in that dialog. -
reporter - changed status to resolved
Needed to check 'Subscribe by Parent' in the Retrieve dialog.
-
repo owner Yeah, and that makes sense given that you're subscribed explicitly to the parent object. Sorry I missed that (much) earlier! Thanks for going through the diagnostic process with me...
-
repo owner - changed component to Metadata Deployment/Retrieval/Removal
- Log in to comment
Jason, is this retrieval of a metadata type that's new with API v50.0. If so, the issue is likely that I haven't yet shipped a build that uses the v50.0 SOAP APIs as I was waiting on the WSDLs from Salesforce. I've since received them and will be uploading a new build shortly (as in within a few hours) that speaks directly to API v50.0.
Since you said fields and record types, though, my guess is that's not the issue. If that's the case, can you please add the following to Help>Diagnostic Tools>Debug Log Settings and then refresh the metadata list in the retrieval dialog:
Then please provide the resulting
idea.log
either here as an attachment or via email to support@illuminatedcloud.com. You can find it using Help>Show Log in Explorer/Finder/Files. Also please specify the exact type/name of the metadata that's not showing up properly so I can see how/whether it was returned by the API.