Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate "Empty Org Recycle Bin" #486

Open
mkreth opened this issue May 31, 2022 · 2 comments
Open

Automate "Empty Org Recycle Bin" #486

mkreth opened this issue May 31, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@mkreth
Copy link

mkreth commented May 31, 2022

Problem Statement

In our Salesforce org, frequently large number of records get deleted and then are kept in the Recycle Bin for a while. This negatively affects the performance of our reports and dashboards (according to Salesforce Support). Recommendation from Salesforce Support was to frequently empty the recycle bin if these records are no candidates to be undeleted. We currently have no known way of automating this.

Feature Request

Provide a capability to automatically navigate to the Recycle Bin in LEX /lightning/o/DeleteEvent/home and press the "Empty Org Recycle Bin" button and automatically confirm the following question.

@amtrack
Copy link
Owner

amtrack commented May 31, 2022

I haven't tried it yet, but it looks like there is an API to do that: emptyRecycleBin() maybe in combination with getDeleted()
So this could maybe automated with JSforce for example.
But of course this could be a browserforce plugin, too.

@mkreth
Copy link
Author

mkreth commented Jun 1, 2022

Max number of records the emptyRecycleBin() API call allows is 200 per request. If the recycle bin contains hundreds of thousands of records this sound very time consuming to do via API calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants