How to use Add Row while doing a Destructive Commit

At times while performing a Destructive Commit and clicking on the 'Commit Changes' button, you might come back to the User Story record and see that the selected components are not displayed in the User Story Selections. Furthermore, at the top of the User Story record, you will see a warning message "The Latest Commit contains No Changes". We usually suggest not to do a Destructive Commit in the same manner as you do a normal Commit/Re-commit operation but use the 'Add Row' functionality.

Do note that you would need to create a 'new' User Story since the User Story now which you have already observed the "The Latest Commit contains No Changes" message won't work anymore since the same Feature Branch will be re-used. Kindly create a new User Story, populate the correct Org Credential, select the correct base branch and follow the below steps.

OBJECTIVE: To delete a custom field named CopaField__c belonging to the object named CopaObject__c

1. Navigate to the newly created User Story record, change the Git Operation to 'Destructive Changes', click on 'Advanced' to change the base branch.
2. Click on the 'Add Row' button at the bottom of the Commit Grid.

User-added image
3. After clicking the 'Add Row' button, go to the 'Selected Metadata' tab in the Commit Grid. You will see a row has been populated with Placeholder values in the following manner.

User-added image

4. Remove the placeholder value of the Name from '[Metadata API Name]' and add the API Name of the component you wish to delete. In our case, we will add 'CopaObject__c.CopaField__c' and replace the Type from '[Metadata Type]' to the type of component. In our case, this will be 'CustomField'.

User-added image

5. If you wish to commit more components, click on the 'All Metadata' tab -> Click on the 'Add Row' button and repeat Steps 3 and 4.

6. Finally, click on the 'Commit Destructive Changes' button in the upper right-hand corner of the commit page.

After a successful commit, these components will get deleted from the branch of your Git Repository for the corresponding branch of the Org Credential and you should be able to see them in the User Story Selections. You can then perform a normal deployment of this User Story.

How did we do?