3

Needed to edit picklist values for CampaignMember, so added entry via metadata using MavensMate and all works well in the Org

Viewing the same metadata in Force.com IDE, there are no <picklistValues> tags in the metadata XML.

What do I need to do to get Force.com IDE to match the MM behaviour? I'll soon be forced to only use Force.com IDE at work, so would like to get consistent behaviour across both tools.

MavensMate CampaignMember metadata

Force.com IDE CampaignMember metadata

Selected metadata for this object in IDE

Force.com IDE metadata selection

  • Did you do a retrieve on the object in the force.com ide? Shame you are being forced into that ide. So many better options – Eric Jan 16 '17 at 13:24
  • @Eric - yes, retrieved both objects, its the contents that seem different – Rob Cowell Jan 16 '17 at 13:33
  • Are the subscriptions the same for both tools? All fields for the object? – Eric Jan 16 '17 at 13:37
  • As far as I can tell, yes... can't paste images into comments, will update question with another image – Rob Cowell Jan 16 '17 at 13:42
  • 1
    It's a lot easier to read and search if you use text versions, not images. – Adrian Larson Jan 16 '17 at 13:45
3

It looks like the retrieve behavior changed in metadata api in the most recent release (version 38.0) so that you now need to specify standard picklist fields in the package.xml file as StandardValueSet, but it looks like the force.com ide hasn't made the update yet when they generate the package.xml file.

One solution to get the standard picklist fields would be to revert to a previous api version :

<version>37.0</version>
1

To expand on the accepted answer, from the docs at https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/manifest_samples.htm (easy to find the docs when you know what you're looking for...)

In API version 38.0 and later, the StandardValueSet type represents standard picklists. Picklists are no longer represented by fields as in earlier versions. This sample package.xml represents the Industry standard picklist as a StandardValueSet type.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Industry</members>
        <name>StandardValueSet</name>
    </types>
    <version>38.0</version>
</Package>
0

Too big for a comment - package.xml from Force.com IDE version

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexComponent</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexPage</name>
    </types>
    <types>
        <members>Account</members>
        <members>AccountContactRole</members>
        <members>Activity</members>
        <members>Asset</members>
        <members>AssistantProgress</members>
        <members>Campaign</members>
        <members>CampaignMember</members>
        <members>Case</members>
        <members>CaseContactRole</members>
        <members>Contact</members>
        <members>ContentVersion</members>
        <members>Contract</members>
        <members>ContractContactRole</members>
        <members>DuplicateRecordItem</members>
        <members>DuplicateRecordSet</members>
        <members>EmailMessage</members>
        <members>Event</members>
        <members>ExchangeUserMapping</members>
        <members>FeedItem</members>
        <members>ForecastingCategoryMapping</members>
        <members>Idea</members>
        <members>Lead</members>
        <members>LinkedArticle</members>
        <members>Macro</members>
        <members>MacroAction</members>
        <members>MacroInstruction</members>
        <members>Opportunity</members>
        <members>OpportunityCompetitor</members>
        <members>OpportunityContactRole</members>
        <members>OpportunityLineItem</members>
        <members>Order</members>
        <members>OrderItem</members>
        <members>PartnerRole</members>
        <members>Pricebook2</members>
        <members>PricebookEntry</members>
        <members>Product2</members>
        <members>Question</members>
        <members>Reply</members>
        <members>Site</members>
        <members>SocialPersona</members>
        <members>SocialPost</members>
        <members>Solution</members>
        <members>StreamingChannel</members>
        <members>Task</members>
        <members>User</members>
        <members>UserProvisioningRequest</members>
        <members>*</members>
        <name>CustomObject</name>
    </types>
    <types>
        <members>*</members>
        <name>Profile</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTrigger</name>
    </types>
    <version>38.0</version>
</Package>
  • 1
    The api version is the same too then? Try dialing it down to 37.0 or below.. – martin Jan 16 '17 at 14:06
  • @martin I can only see API version specified on Apex classes, not the object metadata. It's the same sandbox though, so both Spring 17 EDIT - Ah, bottom of the package.xml - 38 in IDE, 36 in MM.... – Rob Cowell Jan 16 '17 at 14:10
  • 1
    I meant for the package.xml file version number. I think the behavior changed in the most recent release so that you now need to specify standard picklist fields in the package.xml file, but it looks like the force.com ide hasn't made the update yet. – martin Jan 16 '17 at 14:11
  • That's fixed it, thanks @martin. Wanna make this an answer so I can upvote/mark as accepted ? – Rob Cowell Jan 16 '17 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.