function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
awilawil 

Eclipse can't see custom field on managed object

I have installed a managed (beta) package in a sandbox org. I then created (via web setup) a custom field on one of the custom objects in that managed package. I can't find that custom field in the Eclipse IDE.

I looked both under Referenced Packages (the custom object appears, but not the new field, even after refresh) as well as in the src folder (can't make the custom object appear here, even if I add it explicitly to the package.xml file).

Is this by design?
JonPJonP
Are you able to download the custom field using the Force.com Migration Tool for Ant?  Just like the Force.com IDE, it uses the Metadata API, but it puts a little more control in your hands.
awilawil
No, that doesn't work either. It doesn't show up if I retrieve the package, nor if I try to download the custom object as part of the unpackaged metadata (the object doesn't come down at all in that case, similar to Eclipse).

Where is a custom field that was added to a packaged custom object SUPPOSED to show up? I can understand it not showing up in the Referenced Package/packageName/objects folder since the field is not really part of the package, but for it to show up in the unpackaged metadata ('src') folder also doesn't seem exactly right. Yet it seems there has to be some way to access this metadata.
JonPJonP
It should should show up in src/objects/{objectName}.object, not under Referenced Packages, since (as you point out) your custom field is not in any package.  We'll have to look into this.

In the meantime, can you post your package.xml?
awilawil
Here is the package.xml file. It's the object "Lead2__c" that is part of the managed package and to which a new custom field was added, but cannot be seen.

Code:
<—xml version="1.0" encoding="UTF-8"–>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <members>LeadConvertExt</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexComponent</name>
    </types>
    <types>
        <members>*</members>
        <members>LeadConvert</members>
        <name>ApexPage</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTrigger</name>
    </types>
    <types>
        <members>*</members>
        <name>CustomApplication</name>
    </types>
    <types>
        <members>*</members>
        <name>CustomLabels</name>
    </types>
    <types>
        <members>*</members>
        <members>Lead2__c</members>
        <members>Account</members>
        <members>Activity</members>
        <members>Asset</members>
        <members>Campaign</members>
        <members>Case</members>
        <members>Contact</members>
        <members>Contract</members>
        <members>Event</members>
        <members>Idea</members>
        <members>Lead</members>
        <members>Opportunity</members>
        <members>OpportunityLineItem</members>
        <members>Product2</members>
        <members>Solution</members>
        <members>Task</members>
        <members>User</members>
        <name>CustomObject</name>
    </types>
    <types>
        <members>*</members>
        <name>CustomObjectTranslation</name>
    </types>
    <types>
        <members>*</members>
        <name>CustomPageWebLink</name>
    </types>
    <types>
        <members>*</members>
        <name>CustomTab</name>
    </types>
    <types>
        <members>CompanyDashboards</members>
        <members>CompanyDashboards/AdoptionDashboard</members>
        <members>CompanyDashboards/CompanyPerformanceDashboard</members>
        <name>Dashboard</name>
    </types>
    <types>
        <members>*</members>
        <name>HomePageComponent</name>
    </types>
    <types>
        <members>*</members>
        <name>HomePageLayout</name>
    </types>
    <types>
        <members>*</members>
        <name>Layout</name>
    </types>
    <types>
        <members>*</members>
        <name>Letterhead</name>
    </types>
    <types>
        <members>*</members>
        <name>Profile</name>
    </types>
    <types>
        <members>*</members>
        <name>ReportType</name>
    </types>
    <types>
        <members>*</members>
        <name>Scontrol</name>
    </types>
    <types>
        <members>*</members>
        <name>StaticResource</name>
    </types>
    <types>
        <members>*</members>
        <name>Workflow</name>
    </types>
    <version>14.0</version>
</Package>

 

Bill EidsonBill Eidson
  Awil -

  You mentioned that it was a managed package, so the name of the object will include the namespace prefix (the value of which I didn't see mentioned in the previous posts), e.g. thepackagens__Lead__c.  You should be able to use that in package.xml
  Alternatively, you could also add that specific custom field into a separate package & have Eclipse just retrieve that package.
  I hope that helps.

  Thanks,

  - Bill

awilawil
Bingo. I added the package name to the front of the custom object and the object definition came down in its entirety (fields that were part of the package and newly added custom fields).

Thanks!