Not able to retrieve the latest metadata for Custom field/Custom object
Hi,
I am not able to retrieve the latest changes for the custom fields on any object. Steps to reproduce -
- Open the existing Custom_field__c.xml file.
- Right click and select Illuminated Cloud → Retrieve Metadata
- Blank screen when selecting the context option under Contents.
- I changed the Contents dropdown to Custom.
- Selected the desired Custom field under Objects → Custom__c → Custom_Field__c.
- Click on the Retrieve button.
Nothing happened.
Then I tried to use the Compare with the server option. That gives me this below message
Retrieved 1/2 components from arnab-dev in 7 s 923 ms with status SUCCEEDED.
Successes
=========
• package.xml
Failures
========
• package.xml: Entity of type 'CustomField' named 'CUSOMT_FIELD__c' cannot be found
Please let me know if you need any additional details. Its probably something silly I am missing. I am not able to perform my daily tasks without this functionality.
Comments (11)
-
repo owner -
reporter Thanks Scott!!.. I just emailed you the log..
-
repo owner Hi. I didn't receive an email from you. Can you please (re)send it to support@illuminatedcloud.com? Also, did the typo in my previous response look familiar?
-
reporter Hi - oops.. I just sent the email to your support address. The field is an existing one and we have the xml file in our version control. I just added a new Picklist value to the field. I needed to pull those changes from my sandbox org to the file in IntelliJ.
-
repo owner I'm seeing the following retrieval error in the log:
Entity of type "CustomField" named "Secondary_Churn_Reason__c" cannot be found
Is that the field in question? If so, either it doesn't exist in the org or the user configured with IC's connection doesn't have access to it.
-
reporter Yes.. I do have access actually when I tried with the sfdx command it worked. See this below command..
sfdx force:source:retrieve --sourcepath /force-app/main/default/objects/Opportunity/fields/Secondary_Churn_Reason__c.field-meta.xml === Retrieved Source FULL NAME TYPE PROJECT PATH ───────────────────────────────────── ─────────── ────────────────────────────────────────────────────────────────────────────────────────── Opportunity.Secondary_Churn_Reason__c CustomField force-app/main/default/objects/Opportunity/fields/Secondary_Churn_Reason__c.field-meta.xml
I am not sure what I am doing wrong..
-
repo owner Ah, I think I see the issue. You've configured a metadata format project and corresponding native connection against source format files. You need to create an SFDX project against an OAuth connection if you're going to have your files stored in source format. See the user guide topics on Creating Projects:
https://bitbucket.org/RoseSilverSoftware/illuminatedcloud/wiki/User_Guide/Home
-
reporter Thanks Scott!! So I had to select the
sfdx
executable in the configuration. And I have to use the sfdx connections to get the metadata in correct format. -
repo owner If you want to work with files in source format--which is the more flexible, decomposed format introduced with Salesforce DX--you will need to use SFDX projects in IC2 and Salesforce CLI-based connections for those projects, either against scratch orgs of OAuth connections against non-scratch orgs.
-
repo owner - changed status to resolved
I think this can be resolved now. Let me know if I'm mistaken.
-
repo owner - changed component to Metadata Deployment/Retrieval/Removal
- Log in to comment
Is
CUSOMT_FIELD__C
a typo by you in the pasted section, or is it perhaps incorrect somewhere else? That just stands out to me. If that doesn't help resolve it, I'll need you to enable debug logging for metadata retrieval, reproduce the issue, and either attach or email the resultingidea.log
(Help>Show Log in Explorer/Finder/Files).