You need to sign in to do that
Don't have an account?

Updating Pick list values via metadata API need help
hi guys i have woring on METADATA Api
and i have successfully create soap envelope to add new picklist value in picklist field
via
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:met="http://soap.sforce.com/2006/04/metadata"> <soapenv:Header> <met:CallOptions> <met:client>---</met:client> </met:CallOptions> <met:SessionHeader> <met:sessionId>---</met:sessionId> </met:SessionHeader> </soapenv:Header> <soapenv:Body> <update xmlns="http://soap.sforce.com/2006/04/metadata"> <!--Zero or more repetitions:--> <UpdateMetadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="customfield"> <currentName>lead.number__c</currentName> <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField"> <!--Optional:--> <fullName>lead.number__c</fullName> <label>number</label> <picklist> <picklistValues> <fullName>new</fullName> </picklistValues> <sorted>false</sorted> </picklist> <type>Picklist</type> </metadata> </UpdateMetadata> </update> </soapenv:Body> </soapenv:Envelope>
Now issues I am facing , is
Is there any way to update / edit any particular picklist value ???
e.g , Object : Lead , field : number__c, type : picklist , picklist values : new , old
any way i can edit "new " to "new_value" via meta data API .
Thanks to soap and metadata api developers in advance
Hi,
I think what the way you are using to create the fields(copy the fields) in meta data API. it also worked for delete and edit the picklist value in metadata Api.
Hi .
Thanks for reply
But .No actually ..
metadata Api does not support deleting picklist value . for sure
i just could not find any method to edit any particular picklist value
I am just Posting updated verison with controlling field
but still no answer on updaiung pisklist value ::: :(
I've been trying to use the Force.com ANT migration tool to delete picklist values but I haven't had any success.
The only way to delete a picklist value is by manual configuration.
I think the option to update or delete an existing picklist value is not available because of data integrity problem that comes along with deleting an existing picklist value.
If you rename or delete an existing picklist value you will also have to address any records that references the deleted and renamed picklist value.