Skip to content

Conversation

@WillieRuemmele
Copy link
Contributor

@WillieRuemmele WillieRuemmele commented Jan 19, 2022

What does this PR do?

adds purgeondelete to *:deploy which will empty the recycle bin when an object is deleted

I'm not sure how to verify this in Lightning

  1. create custom object
  2. retrieve into local project
  3. generate destructive manifest for the custom object (destructiveChangesPost.xml)
  4. generate a manifest to be deployed alongside the destructive changes, can be empty, or populated (package.xml)
  5. in the UI, click the astro icon in the top right, and switch to salesforce classic
  6. navigate back to setup -> create -> objects
  7. run sfdx force:source:deploy -x package.xml --postdestructivechanges destructiveChangesPost.xml
  8. refresh the page and notice Deleted Objects(1) at the bottom of the list
  9. click that, and undelete your custom object
  10. notice your custom object is back in the list
  11. run sfdx force:source:deploy -x package.xml --postdestructivechanges destructiveChangesPost.xml --purgeondelete
  12. refresh the page and notice the object is deleted, and not available in Deleted Objects

What issues does this PR fix or reference?

@W-4649658@

"predestructivechanges": "file path for a manifest (destructiveChangesPre.xml) of components to delete before the deploy",
"postdestructivechanges": "file path for a manifest (destructiveChangesPost.xml) of components to delete after the deploy"
"postdestructivechanges": "file path for a manifest (destructiveChangesPost.xml) of components to delete after the deploy",
"purgeOnDelete": "the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. Instead, they become immediately eligible for deletion."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jshackell-sfdc I took this description right from here but let me know if it should be different

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworked it a bit, see below.

"predestructivechanges": "file path for a manifest (destructiveChangesPre.xml) of components to delete before the deploy",
"postdestructivechanges": "file path for a manifest (destructiveChangesPost.xml) of components to delete after the deploy"
"postdestructivechanges": "file path for a manifest (destructiveChangesPost.xml) of components to delete after the deploy",
"purgeOnDelete": "the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. Instead, they become immediately eligible for deletion."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"purgeOnDelete": "the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. Instead, they become immediately eligible for deletion."
"purgeOnDelete": "specify that deleted components in the destructive changes manifest file are immediately eligible for deletion rather than being stored in the Recycle Bin"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

committed 👍

Co-authored-by: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com>
Copy link
Contributor

@jshackell-sfdc jshackell-sfdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edited the flag description, let me know if i mistakenly changed the meaning!

@shetzel shetzel merged commit 6b99f44 into main Jan 27, 2022
@shetzel shetzel deleted the wr/purgeOnDelete branch January 27, 2022 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants