You need to sign in to do that
Don't have an account?
alfo72
Creating Package.xml with VS and getting Picklist Error
Just getting started here, crash course in Packaging for a new org we are building.
Created a scratch org, made some basic changes:
Now want to create a package and configured package.xml as:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Account</members>
<name>CustomObject</name>
</types>
<types>
<members>Account.AccountSource</members>
<name>CustomField</name>
</types>
<types>
<members>LeadSource</members>
<name>StandardValueSet</name>
</types>
<types>
<members>Account.CXC_Client</members>
<members>Account.CXC_Contractor_Company</members>
<members>Account.CXC_Contractor_Employee</members>
<members>Account.CXC_Entity</members>
<members>Account.CXC_Service_Partner</members>
<members>Account.CXC_Supplier</members>
<name>RecordType</name>
</types>
<types>
<members>Admin</members>
<name>Profile</name>
</types>
Get the following error :
Account.Client: Picklist value: Advertisement in picklist: AccountSource not found
Lots of reading and links and changes and variations but still can't get it working. Do I have the order wrong? Do I need to do something else first? Everything i have read suggests it is the right approach.
Created a scratch org, made some basic changes:
- 5 x Account Record Types
- 6 x Custom Text/Number Fields
- Amended a Layout
- Gave Sys Admin Profile field permissions.
Now want to create a package and configured package.xml as:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Account</members>
<name>CustomObject</name>
</types>
<types>
<members>Account.AccountSource</members>
<name>CustomField</name>
</types>
<types>
<members>LeadSource</members>
<name>StandardValueSet</name>
</types>
<types>
<members>Account.CXC_Client</members>
<members>Account.CXC_Contractor_Company</members>
<members>Account.CXC_Contractor_Employee</members>
<members>Account.CXC_Entity</members>
<members>Account.CXC_Service_Partner</members>
<members>Account.CXC_Supplier</members>
<name>RecordType</name>
</types>
<types>
<members>Admin</members>
<name>Profile</name>
</types>
Get the following error :
Account.Client: Picklist value: Advertisement in picklist: AccountSource not found
Lots of reading and links and changes and variations but still can't get it working. Do I have the order wrong? Do I need to do something else first? Everything i have read suggests it is the right approach.
All Answers
Rajnish
It's been a while (over 2 years).
Essentially there were no picklist values for the standard field called AccountSource, so it throws an error on packaging. AccountSource uses the LeadSource Standard Value Set.
So in your package you would need to make sure you are deploying LeadSource.standardValueSet metadata with the relevant values before deploying AccountSource.
https://help.salesforce.com/s/articleView?id=000317064&type=1