Loading
Salesforce Help 사이트 “Help Agent powered by Fin” 도입 안내더 많이 읽기
Tableau 고객 대상: Tableau를 이용하는 고객이 Help 사이트에서 사례(케이스)를 등록할 수 없는 경우의 대체 수단더 많이 읽기
Slack 관련 문의처가 Salesforce Help로 통합 및 변경됩니다.더 많이 읽기

Retrieve Account.AccountSource Picklist Values with Metadata API

게시 일자: May 22, 2026
상세 설명

When using the Salesforce Metadata API to retrieve Account.AccountSource picklist values, a package.xml file that specifies the CustomField member type returns an Account.object file without any picklist values. This is a known behavior because standard picklist values are not stored directly on the field definition in the Metadata API.

Example package.xml that returns no picklist values:

<?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>

Why This Happens

Starting with Metadata API version 38.0, standard picklist values are managed separately through the StandardValueSet Metadata type — not through CustomField. Account.AccountSource shares its picklist values with LeadSource, which is the StandardValueSet name to use.

솔루션

This article explains how to retrieve Account.AccountSource picklist values using the Salesforce Metadata API by using the StandardValueSet Metadata type instead of CustomField.

Solution

To retrieve Account.AccountSource picklist values, add a StandardValueSet member to your package.xml. Use LeadSource as the member name, because Account.AccountSource shares its picklist values with the LeadSource StandardValueSet.

Updated package.xml — include both CustomField and StandardValueSet entries:

<?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>


What Gets Retrieved

[1] 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>

[2] 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>


The valid StandardValueSet names can be found at here.

Knowledge 기사 번호

000383067

 
로드 중
Salesforce Help | Article