I have several page layouts for the Lead Object. I have merged them into a new Page Layout Lead-Default. I want to delete the unused page layouts that I no longer need. Can this be done in a inbound change set to my production?
1 Answer
Through the change set, you cannot able to delete that.
Either you can manually delete in Production or you can use Eclipse with destructiveChanges.xml
for deletion.
Refer Deleting Files from an Organization
The package.xml file is a project manifest that lists all the components to retrieve or deploy. Although you can use package.xml to add components, it’s not sufficient to delete them. To delete files, create a delete manifest that’s called destructiveChanges.xml. The format of the delete manifest is the same as package.xml, except that wildcards aren’t supported.
The following sample destructiveChanges.xml file names a single custom object to be deleted:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>MyCustomObject__c</members>
<name>CustomObject</name>
</types>
</Package>
-
if my ans solves your purpose then accept this so that others may find this useful Commented Jun 10, 2017 at 5:16
-
The only caveat with destructive is you cannot use * wild card for members. You have to give the exact layout names in members tag for deletion.– RedDevilCommented Jun 11, 2017 at 15:49