Loading

Calculate File storage at the object level

Publiseringsdato: May 25, 2026
Beskrivelse

In order to make optimal use of storage, you may want to know which object is consuming the most file storage.

You can check Storage Usage for more details, however the breakdown available on this page doesn't provide much detail.

Under Storage Usage page, you can only find :

  • Current File Storage Usage: This will give you further breakdown of the storage usage based on Content Bodies, Photos, Attachments, Documents etc
  • Top Users by File Storage Usage: This will give you details about the content uploaded by each user and its contribution to the storage usage.
Løsning

There is no standard functionality with which you can find file storage consumed by each object.

However, you can use 'ContentVersion.csv' and 'ContentDocumentLink.csv' files from exported data to get desired information. Follow below steps to achieve desired result:

STEP 1:
Export data using Data Export services, and include ContentVersion and ContentDocumentLink OR Export ContentVersion and ContentDocumentLink using Data Loader.

STEP 2: 

  • Open 'ContentVersion.csv'
  • Cut ContentSize column and paste it next to ContentDocumentId  column.
  • Open 'ContentDocumentLink.csv'. Create new column next to LinkedEntityId and name it ObjectPrefix.
  • Add another column next to 'ContentDocumentId' column and name it ContentSize. 
  • Under 'ObjectPrefix' column, type below command and apply it to all the rows below.
=LEFT(B2,3)
##B2 is referencing first value under 'LinkedEntityId' column; copy entire column and past as values at the same location.
  • Under ContentSize column type below command and apply it to all the rows.
=VLOOKUP(D2,ContentVersion.csv!$B:$C,2,0)
## D2 column is referencing 
first value under 'ContentDocumentId' column, wherein B & C columns are referencing ContentDocumentId & ContentSize columns in 'ContentVersion.csv' file.


STEP 3: 

  • Copy 'ObjectPrefix' column and paste it in another column on same worksheet (lets say column L).
  • Select column L and remove Duplicate values using Data>>Remove Duplicates option.
  • Column L will show you only unique object prefixes.

    STEP 4: 
  • Create another column (lets say M) and name it as ObjectwizeFileSize
  • Under ObjectwizeFileSize type below condition and apply it to all the rows below:

=SUMIFS(C:C,E:E,L2) # C is for ContentSize column, E is for ObjectPrefix column & L is for ObectPrefix column

  • You can use Column M information to identify the object which consumes more File Storage & optimize it. 

Note: File size is in MB.

Knowledge-artikkelnummer

000381136

 
Laster
Salesforce Help | Article