When we try to do an operation in salesforce we can get this message:
Insert failed. First exception on row 0; first error: STORAGE_LIMIT_EXCEEDED, storage limit exceeded: []
This happens because we have reach the Salesforce limit for Storage. You can check it on :
Setup >> Storage Usage
My Case I had to clean some objects, so I run this script.
List<attachment> ListObjects =
[SELECT id from attachment];
System.debug(
ListObjects.size()
);
Database.delete(ListObjects, false);
ListObjects =
[SELECT id from attachment];
System.debug(
ListObjects.size()
);
Clean the Bin as well
Home >> Recycle Bin >> Empty Your organization's recycle bin