If you wish to mass delete any HubSpot records (HubSpot Intelligence, HubSpot Logs, HubSpot Log Messages, HubSpot Activities) from Salesforce, you will need to generate a list or the IDs to be deleted and use a data loading application to do so.
If you delete a HubSpot Intelligence record attached to a lead or a contact, the records will continue to sync but the Visualforce page data will be removed.
Please note: starting on August 6, 2018, HubSpot will no longer create HubSpot Intelligence object records in Salesforce for HubSpot syncing contacts. When you upgrade your HubSpot package for Salesforce to v3.0, the Visualforce window in Salesforce will populate with information from the HubSpot contact record.
You may also delete HubSpot Logs/Log Messages (these records are purely for troubleshooting purposes), but if sync errors are still actively occurring, more Log Messages will be created as syncs continue to fail.
- To find a list of orphaned HubSpot Intelligence records to delete, create a report of the HubSpot Intelligence where both the lead and contact are blank.
- In Salesforce, create a report with the type HubSpot Intelligence
- Click Add next to Filters and select Cross Filter (1)
- Create a cross filter for HubSpot Intelligence | without | Contacts
- Repeat this process to create another cross filter for HubSpot Intelligence | without | Leads
- Add the field HubSpot Intelligence: ID to the table (2)
- Click Save, name your report, then click Save and run report.
- Click Export details to export the report data to a .csv file and save to your desktop–be sure to include the record ID, as this it what you will need to run the delete
- Download a data management system from the App Exchange Marketplace (such ad Apex Data Loader) or go to https://dataloader.io
- Using the data loader, upload the .csv and run the delete function - this will remove the records in the file from Salesforce
- It is important to note that the Salesforce recycle bin can only hold a finite number of records - once this limit is hit, the oldest records will be permanently deleted
This process can be used to mass delete any record from Salesforce, standard or custom. If you wish to delete all records of a certain type, you can run a report in Salesforce of the object you wish to delete, making sure to include the Record ID. You may also use the data loading application to run this query. Once you have a list of the IDs to delete, run the delete task in the data loader.