Delete picklist inactive values using ANT

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
3
down vote

favorite












We need to delete inactive values from some of our picklist using ant and we are not able to do it.



We have tried with this 'destructivePackage.xml':



<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>MiC_Log__c.Picklist_Test__c.Hola</members>
<name>PicklistValue</name>
</types>
<version>43.0</version>
</Package>


It seems it is working to move active values to inactive values, but not to delete the inactive value.



Any solution?







share|improve this question




















  • Is it possible that there is a record with the given value of picklist?
    – kurunve
    Aug 28 at 8:35










  • yeah, in this case the inactive value is 'Hola'.
    – lopez.regalado.fj
    Aug 28 at 8:38
















up vote
3
down vote

favorite












We need to delete inactive values from some of our picklist using ant and we are not able to do it.



We have tried with this 'destructivePackage.xml':



<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>MiC_Log__c.Picklist_Test__c.Hola</members>
<name>PicklistValue</name>
</types>
<version>43.0</version>
</Package>


It seems it is working to move active values to inactive values, but not to delete the inactive value.



Any solution?







share|improve this question




















  • Is it possible that there is a record with the given value of picklist?
    – kurunve
    Aug 28 at 8:35










  • yeah, in this case the inactive value is 'Hola'.
    – lopez.regalado.fj
    Aug 28 at 8:38












up vote
3
down vote

favorite









up vote
3
down vote

favorite











We need to delete inactive values from some of our picklist using ant and we are not able to do it.



We have tried with this 'destructivePackage.xml':



<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>MiC_Log__c.Picklist_Test__c.Hola</members>
<name>PicklistValue</name>
</types>
<version>43.0</version>
</Package>


It seems it is working to move active values to inactive values, but not to delete the inactive value.



Any solution?







share|improve this question












We need to delete inactive values from some of our picklist using ant and we are not able to do it.



We have tried with this 'destructivePackage.xml':



<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>MiC_Log__c.Picklist_Test__c.Hola</members>
<name>PicklistValue</name>
</types>
<version>43.0</version>
</Package>


It seems it is working to move active values to inactive values, but not to delete the inactive value.



Any solution?









share|improve this question











share|improve this question




share|improve this question










asked Aug 28 at 8:24









lopez.regalado.fj

34529




34529











  • Is it possible that there is a record with the given value of picklist?
    – kurunve
    Aug 28 at 8:35










  • yeah, in this case the inactive value is 'Hola'.
    – lopez.regalado.fj
    Aug 28 at 8:38
















  • Is it possible that there is a record with the given value of picklist?
    – kurunve
    Aug 28 at 8:35










  • yeah, in this case the inactive value is 'Hola'.
    – lopez.regalado.fj
    Aug 28 at 8:38















Is it possible that there is a record with the given value of picklist?
– kurunve
Aug 28 at 8:35




Is it possible that there is a record with the given value of picklist?
– kurunve
Aug 28 at 8:35












yeah, in this case the inactive value is 'Hola'.
– lopez.regalado.fj
Aug 28 at 8:38




yeah, in this case the inactive value is 'Hola'.
– lopez.regalado.fj
Aug 28 at 8:38










1 Answer
1






active

oldest

votes

















up vote
7
down vote













Deleting picklist values operation is not supported by Salesforce METADATA API



This is because of when we delete any picklist value by UI we need to set replacement of that value in records i.e. Blank or Any other picklist value.



Reference - https://blog.jeffdouglas.com/2008/07/15/migrating-salesforcecom-configurations-with-the-metadata-api-forcecom-migration-tool/






share|improve this answer






















  • Your answer seems to be logical, but are there any links that can proof this?
    – kurunve
    Aug 28 at 9:55










  • blog.jeffdouglas.com/2008/07/15/…
    – Sunil Aware
    Aug 28 at 10:12










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "459"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f230319%2fdelete-picklist-inactive-values-using-ant%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
7
down vote













Deleting picklist values operation is not supported by Salesforce METADATA API



This is because of when we delete any picklist value by UI we need to set replacement of that value in records i.e. Blank or Any other picklist value.



Reference - https://blog.jeffdouglas.com/2008/07/15/migrating-salesforcecom-configurations-with-the-metadata-api-forcecom-migration-tool/






share|improve this answer






















  • Your answer seems to be logical, but are there any links that can proof this?
    – kurunve
    Aug 28 at 9:55










  • blog.jeffdouglas.com/2008/07/15/…
    – Sunil Aware
    Aug 28 at 10:12














up vote
7
down vote













Deleting picklist values operation is not supported by Salesforce METADATA API



This is because of when we delete any picklist value by UI we need to set replacement of that value in records i.e. Blank or Any other picklist value.



Reference - https://blog.jeffdouglas.com/2008/07/15/migrating-salesforcecom-configurations-with-the-metadata-api-forcecom-migration-tool/






share|improve this answer






















  • Your answer seems to be logical, but are there any links that can proof this?
    – kurunve
    Aug 28 at 9:55










  • blog.jeffdouglas.com/2008/07/15/…
    – Sunil Aware
    Aug 28 at 10:12












up vote
7
down vote










up vote
7
down vote









Deleting picklist values operation is not supported by Salesforce METADATA API



This is because of when we delete any picklist value by UI we need to set replacement of that value in records i.e. Blank or Any other picklist value.



Reference - https://blog.jeffdouglas.com/2008/07/15/migrating-salesforcecom-configurations-with-the-metadata-api-forcecom-migration-tool/






share|improve this answer














Deleting picklist values operation is not supported by Salesforce METADATA API



This is because of when we delete any picklist value by UI we need to set replacement of that value in records i.e. Blank or Any other picklist value.



Reference - https://blog.jeffdouglas.com/2008/07/15/migrating-salesforcecom-configurations-with-the-metadata-api-forcecom-migration-tool/







share|improve this answer














share|improve this answer



share|improve this answer








edited Aug 28 at 12:19

























answered Aug 28 at 8:58









Sunil Aware

3113




3113











  • Your answer seems to be logical, but are there any links that can proof this?
    – kurunve
    Aug 28 at 9:55










  • blog.jeffdouglas.com/2008/07/15/…
    – Sunil Aware
    Aug 28 at 10:12
















  • Your answer seems to be logical, but are there any links that can proof this?
    – kurunve
    Aug 28 at 9:55










  • blog.jeffdouglas.com/2008/07/15/…
    – Sunil Aware
    Aug 28 at 10:12















Your answer seems to be logical, but are there any links that can proof this?
– kurunve
Aug 28 at 9:55




Your answer seems to be logical, but are there any links that can proof this?
– kurunve
Aug 28 at 9:55












blog.jeffdouglas.com/2008/07/15/…
– Sunil Aware
Aug 28 at 10:12




blog.jeffdouglas.com/2008/07/15/…
– Sunil Aware
Aug 28 at 10:12

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f230319%2fdelete-picklist-inactive-values-using-ant%23new-answer', 'question_page');

);

Post as a guest













































































這個網誌中的熱門文章

How to combine Bézier curves to a surface?

Carbon dioxide

Why am i infinitely getting the same tweet with the Twitter Search API?