function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dai.odaharadai.odahara 

updating picklist values from metadata api

 Does anyone know how to update picklist value from metadata api?

 I wrote an xml message as followings referring http://www.salesforce.com/us/developer/docs/api_meta/index.htm, but it does not work well.

 

In this case, with the first picklist values that currentname and fullname are different,  it supposed to be updating the picklist  value. but on the contrary as result, this picklist would have 3 picklist values -

"next month", "this month", "xxxx".

 

 The value of "this month" is being treated as new picklist value...any clue on this..?

 

*********************

<soapenv:Body>
 <update>
  <UpdateMetadata>
  <currentName>Account.salaryDay__c</currentName>
  <metadata xsi:type="ns2:CustomField">
    <fullName>Account.salaryDay__c</fullName>
    <label>payday</label>
    <type>Picklist</type>
    <picklist>
     <sorted>true</sorted>
     <picklistValues>
      <currentName>next month</currentName>
      <fullName>this month</fullName>
     </picklistValues>
     <picklistValues>
      <currentName>xxxx</currentName>
      <fullName>xxxx</fullName>
     </picklistValues>

   ....

   </soapenv:Body>
  </update>
 </UpdateMetadata>

*********

 

Thank you so much

Chirag MehtaChirag Mehta

Following is url for documentation about Picklist Metadata API ...

http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_picklist.htm

Apex LearnerApex Learner

is there any way to edit picklist value through metadat API . 

I am current testing meta data API via SOAP ui and till now I am able to add picklist values .

but can not edit any perticuler picklist value 

 

eg . object : lead 

       field : number__c

  type : picklist

 

values : 1 , 2

 

any methode i can edit 1 to 11  ??

 

dinesh angaridinesh angari
Hi Apex Learner,

If you have any sample SOAP request to update or add picklist in SFDC.
Please send it to me,I am facing problem to wright correct SOAP request.


Thanks in Advance...............