Print this page

Retrieve Account.AccountSource picklist values using Metadata API version 38.0

Knowledge Article Number 000247180
Description If I use below package.xml to retrieve Account.AccountSource picklist values, no picklist values can be found in the Account.object file:

Used package.xml:

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

Returned Account.object file:

<?xml version="1.0" encoding="UTF-8"?> 
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"> 
<fields> 
<fullName>AccountSource</fullName> 
<trackFeedHistory>false</trackFeedHistory> 
<type>Picklist</type> 
</fields> 
</CustomObject> 
Resolution As documented here, when using Metadata API version 38.0, standard picklist values are available through the StandardValueSet Metadata object. Incidentally, AccountSource is the same as LeadSource which is the name to use to retrieve Account.AccountSource picklist values:

package.xml: 

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

Retrieved files: 

LeadSource.standardValueSet: 

<?xml version="1.0" encoding="UTF-8"?> 
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata"> 
<sorted>false</sorted> 
<standardValue> 
<fullName>Web</fullName> 
<default>false</default> 
</standardValue> 
<standardValue> 
<fullName>Phone Inquiry</fullName> 
<default>false</default> 
</standardValue> 
<standardValue> 
<fullName>Partner Referral</fullName> 
<default>false</default> 
</standardValue> 
<standardValue> 
<fullName>Purchased List</fullName> 
<default>false</default> 
</standardValue> 
<standardValue> 
<fullName>Other</fullName> 
<default>false</default> 
</standardValue> 
</StandardValueSet> 

Account.object: 

<?xml version="1.0" encoding="UTF-8"?> 
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"> 
<fields> 
<fullName>AccountSource</fullName> 
<trackFeedHistory>false</trackFeedHistory> 
<type>Picklist</type> 
</fields> 
</CustomObject> 

In Summer '16, these are the valid StandardValueSet names:

AccountContactMultiRoles (AccountContactRelation.Roles)
AccountContactRole (AccountContactRole.Role)
AccountOwnership (Account.Ownership
AccountRating (Account.Rating, Lead.Rating)
AccountType (Account.Type)
AddressCountryCode (Country picklist)
AddressStateCode (State picklist)
AssetStatus (Asset.Status)
CampaignMemberStatus (CampaignMember.Status)
CampaignStatus (Campaign.Status)
CampaignType (Campaign.Type)
CaseContactRole (CaseContactRole.Role)
CaseOrigin (Case.Origin)
CasePriority (Case.Priority)
CaseReason (Case.Reason)
CaseStatus (Case.Status)
CaseType (Case.Type)
ContactRole (OpportunityContactRole.Role)
ContractContactRole (ContractContactRole.Role)
ContractStatus (Contract.Status)
EntitlementType (Entitlement.Type)
EventSubject (Event.Subject)
EventType (Event.Type)
FiscalYearPeriodName (Period.PeriodLabel)
FiscalYearPeriodPrefix (FiscalYearSettings.PeriodPrefix)
FiscalYearQuarterName (Period.QuarterLabel)
FiscalYearQuarterPrefix (FiscalYearSettings.QuarterPrefix)
IdeaCategory (IdeaTheme.Categories)
IdeaMultiCategory (Idea.Categories)
IdeaStatus (Idea.Status)
IdeaThemeStatus (IdeaTheme.Status)
Industry (Account.Industry, Lead.Industry)
InvoiceStatus (Invoice.Status)
LeadSource (Account.AccountSource, Lead.Source)
LeadStatus (Lead.Status)
OpportunityCompetitor (Opportunity.Competitors)
OpportunityStage (Opportunity.StageName)
OpportunityType (Opportunity.Type)
OrderStatus (Order.Status)
OrderType (Order.Type)
PartnerRole (Account.PartnerRole)
Product2Family (Product2.Family)
QuestionOrigin (Question.Origin)
QuickTextCategory (QuickText.Category)
QuickTextChannel (QuickText.Channel)
QuoteStatus (Quote.Status)
SalesTeamRole (OpportunityTeamMember.TeamMemberRole, UserAccountTeamMember.TeamMemberRole, UserTeamMember.TeamMemberRole, AccountTeamMember.TeamMemberRole)
Salutation (Contract.BillingName, Invoice.BillingName, Contact.Name, Lead.Name)
ServiceContractApprovalStatus (ServiceContract.ApprovalStatus)
SocialPostClassification (SocialPost.Classification)
SocialPostEngagementLevel (SocialPost.EngagementLevel)
SocialPostReviewedStatus (SocialPost.ReviewedStatus)
SolutionStatus (Solution.Status)
TaskPriority (Task.Priority)
TaskStatus (Task.Status)
TaskSubject (Task.Subject)
TaskType (Task.Type)
WorkOrderLineItemStatus (WorkOrderLineItem.Status)
WorkOrderPriority (WorkOrder.Priority)
WorkOrderStatus (WorkOrder.Status)

‡ The standard value set or picklist can’t be read or updated.




promote demote