Aptitude (12) C (2) C++ (10) CSS (1) Data Structure (2) English (7) General (14) HTML (3) Integration (1) Itinerary and Travel Cost (1) Java (29) JQ (5) JS (5) JSP (1) Lightning (14) logical (3) Math (1) Music Notation (17) MySql (4) Network (1) Regex (1) salesforce (131) Servlet (4) SF Admin (31) SF Dev (102) SQL (4) SQL_SERVER (1) StudyPoints (2) ytChannels (2) अन्ताक्षरी (4)

connection.emptyRecycleBin() || deleting records from recycle bin using client application

Delete records from the recycle bin immediately.
The Recycle Bin lets you view and restore recently deleted records for 15 days before they are permanently deleted. 
EmptyRecycleBinResult[] = connection.emptyRecycleBin(ID[] ids);

Def  1: Your org can have up to 5,000 records per license in the Recycle Bin at any one time.
Def 2:Your Recycle Bin record limit is 25 times the Megabytes (MBs) in your storage. For example, if your organization has 1 GB of storage then your limit is 25 times 1000 MB or 25,000 records. 
For example, if your org has five user licenses, 25,000 records can be stored in the Recycle Bin. If your org reaches its Recycle Bin limit, Salesforce automatically removes the oldest records, as long as they have been in the recycle bin for at least two hours.
If you know you will be adding a great number of records to the Recycle Bin and you know you won't need to undelete()them, you may wish to remove them before the Salesforce process deletes records. 
For example, you can use this call if you are loading a large number of records for testing, or if you are doing a large number of create() calls followed by  delete() calls.

Rules and Guidelines

When emptying recycle bins, consider the following rules and guidelines:
  • The logged in user can delete any record that he or she can query in their Recycle Bin, or the recycle bins of any subordinates. If the logged in user has Modify All Data permission, he or she can query and delete records from any Recycle Bin in the organization.
  • Available in version 10.0 and later.
  • Maximum number of records is 200.
  • Do not include the IDs of any records that will be cascade deleted, or an error will occur.
  • Once records are deleted using this call, they cannot be undelete()d.
  • After records are deleted from the Recycle Bin using this call, they can be queried using queryAll() for some time. Typically this time is 24 hours, but may be shorter or longer

No comments: