Questions tagged [delete]

The delete DML operation deletes one or more existing sObject records from your organization’s data.

75 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
1 answer
1k views

INSUFFICIENT_ACCESS_OR_READONLY - Cannot Delete QuoteLineItem

17 QuoteLineItem records were loaded into the org via Dataloader with the incorrect product2id listed. When trying to delete the records in the GUI while logged in as a System Administrator, the ...
KB145's user avatar
  • 876
4 votes
0 answers
732 views

Deleted contact's ID is not removed from converted lead. Why?

We have a requirement to delete all converted leads whose corresponding contacts have been deleted. Upon implementation we noticed something odd: After creating and converting a lead via UI (classic ...
Christoph's user avatar
  • 1,022
4 votes
1 answer
3k views

Easiest way to delete a million records?

Been doing tests in sandbox in which I've created about a million accountshares that I need to get rid of for testing. I'm trying data loader in bulk api mode to export than delete but I keep ...
J. Zhang's user avatar
  • 313
3 votes
0 answers
85 views

How can I delete FileSearchActivity records?

I was looking through the list of tables in SoqlXplorer, as I do every so often (I find it a useful way to learn things), and I came across a table called FileSearchActivity. What is this table? It ...
Charles Koppelman's user avatar
3 votes
0 answers
1k views

Cannot delete lightning component

Need help. I am deleting a few obsolete/test lightning components (*.cmp) from our sandbox. There's this one component that I cannot delete. When I tried to delete, Dev Console would give me a message ...
pnoytechie's user avatar
  • 1,010
3 votes
1 answer
58 views

Ways to manage deletion of old dasboards and reports

We have a pretty mature org, been going for 9 years and we have well over 3000 reports located in various folders. Now it's time for a cleanup since quite a large bunch of these haven't been run for ...
akarnid's user avatar
  • 1,932
3 votes
0 answers
413 views

How to convert text field to encrypted when referenced in multiple places? New approach?

We have a text field that is referenced several hundred times in all code, validation rules, WFRs, etc that we'd like to encrypt now. In order to do that, seems like we need to delete it and recreate ...
StartingAgain's user avatar
2 votes
1 answer
346 views

How to clean Product Item Transaction from Storage

We are currently having almost 6 GB space occupied by Product Item Transaction object. We want to Delete All Product Item Transaction records except for current and last Year. The object is not ...
SFDCDJ's user avatar
  • 1,864
2 votes
0 answers
60 views

What is a "pending connection" that might be preventing me from deleting a contact and account?

As I'm trying to do some cleanup in a customer's org, I face the following problem when deleting an account: Your attempt to delete Mr. Robert Jefferson could not be completed because it is ...
Renato Oliveira's user avatar
2 votes
0 answers
276 views

How to delete a record from a non-queryable object

I'm trying to delete a record from MobilePushServiceDevice object. This object is not queryable, however, it is deletable. How can I delete a specific record from this object if I can't query it in ...
smukov's user avatar
  • 5,553
2 votes
0 answers
576 views

EMERGENCY I just deployed a change set and now one field has lost all data in production what do I do?

I have an agency field in accounts and for some reason after some recent updates the field seems to be blank for all accounts. The field was not included in the change set and was not dependent on ...
Dataman434's user avatar
2 votes
1 answer
187 views

Remove RemoteSiteSetting from Managed Package

Thanks to @sfdcfox and @AndrewFawcett we were able to figure an elegant way on how to create a dynamic RemoteSiteSetting for the actual salesforce org in order to use MetadataAPI, ToolingAPI and so on:...
Uwe Heim's user avatar
  • 28.4k
1 vote
0 answers
28 views

How to prevent users from merging contacts, but allow deleting contacts

Our business users had a specific requirement to allow certain users to retain the ability to delete records while preventing the ability to merge records. In our use case, the business had an ...
Jacob Crandall's user avatar
1 vote
0 answers
35 views

LEX replacement for Delete override that only applies to UI-initiated delete action?

As prep for migrating to LEX, we need to replace our existing Delete overrides for Quote and QuoteLineItem; they check a custom setting and a couple fields and determine if delete should be allowed. ...
Mo Johnson's user avatar
1 vote
0 answers
89 views

Is it possible to change the contact field on all cases from a lookup to a non-linking text field?

We are cleaning up old contacts and running into the issue of being blocked by linked helpdesk cases. We no longer use Salesforce as a helpdesk but would like to keep record of cases in case we need ...
KKulhanek's user avatar
1 vote
0 answers
183 views

Strange ENTITY_IS_DELETED Error from this Method

Strange one...I'm getting ENTITY_IS_DELETED on the line below, but this method is the only thing that deletes these Account_Rule_Association__c records anywhere, and it is set in most cases to only ...
number41's user avatar
  • 948
1 vote
2 answers
638 views

Why is SOQL query is returning deleted Opportunity split record

I have an Opportunity, under which I had initially added two Opportunity split records. But later I deleted one of the Split records among them using the delete button in the UI, as I didn't need it ...
Akshay Vasu's user avatar
1 vote
0 answers
106 views

Delete file from SFTP with dynamic name

We have following use case: We will have bunch of invoices sent to SFMC SFTP, which will be attached to emails and send to customers. Each invoice name is unique, e.g. {{customerID}}_{{invoiceNr}}_Day....
Emil Vuchkov's user avatar
1 vote
0 answers
856 views

Delete trigger is not firing

Below is the trigger on ContentVersion object. Namely, there is a custom object, Art Inventory, that can have a file (i.e. pics of art) associated with its record. So I am updating a field in the ...
gligor1204's user avatar
1 vote
1 answer
301 views

Delete EventRelation also delete Event when using DELETE request with sObject Collections

I am getting an issue that when i use DELETE request with sObject Collections, to delete an EventRelation, it also delete the main event. DELETE /vXX.X/composite/sobjects?ids=recordId,recordId An ...
nlonguit's user avatar
1 vote
2 answers
374 views

I uninstalled a package but custom fields stayed?

I installed the PhotoLoader by GearDesign into my personal dev org and don't like it so I uninstalled it.. I'm still seeing remnants in certain places. The User object still has the fields it used and ...
tpayne2345's user avatar
1 vote
0 answers
357 views

How do I delete Drafts and Old Inactive Messages from SMS/MobileConnect?

We had a bunch of SMS messages that were never launched and I wanted to clean up the space. Is there a way to delete Drafts from MobileConnect without having to make them active? On the same hand, is ...
Eric L's user avatar
  • 21
1 vote
0 answers
125 views

Which tools\techniques are you using to improve performance of mass deletion of custom object records?

We have a custom object with about 40 million records. We have identified about 18 million that we are going to delete forever. All of this data is permanently retained in an Oracle backup so we are ...
Chet Seidel's user avatar
1 vote
0 answers
17 views

Retrieve deleted records from group edition

Is there a way to retrieve deleted records going back, say 6 months, in Group edition?
Bartley's user avatar
  • 5,257
1 vote
1 answer
239 views

Hard deleted records visibility

We are working on a process where we would like to permanently delete the records so that they are not visible even with workbench. We tried with hard delete but records are still visible for some ...
Ramky's user avatar
  • 11
1 vote
1 answer
1k views

How can I delete an existing page in the Community Builder?

At the Community Builder, how can I delete an existing page? I've been looking through the following UIs but didn't find a button, link or menu for that:
Uwe Heim's user avatar
  • 28.4k
1 vote
1 answer
47 views

Unable to return the list after deleting the record on specific tab:

public PageReference deleteRecord () { ID rid = ApexPages.currentPage().getParameters().get('ruleID'); String runQuery='select Name from Candidate__c where \''+rid+...
Harshal Kolhe's user avatar
1 vote
1 answer
1k views

Flow: Stop deleting using delete trigger

I want to add a before delete trigger on a custom object so that no one can delete any record of this object. I know I can do this in Apex by calling addError(), I was wondering if I achieve the same ...
Xin's user avatar
  • 137
1 vote
1 answer
839 views

Recovering Leads from Campaign Members Section in a Campaign

While going through the campaign members section of a campaign, I accidentally deleted some records. They do not appear in my recycle bin. How/Where do I go to recover them?
B.Martin's user avatar
0 votes
0 answers
43 views

Single Salesforce Flow for record creation, updation and also deletion

Are there any ways to make a single Salesforce flow work on Create, Update and Delete? I know that Salesforce flow supports deletion separately but developers here might know some tricks to make the ...
Mohd hasim's user avatar
0 votes
0 answers
76 views

Salesforce LWC form not loading in external site due to browser cookie

We have displayed a Salesforce LWC form in an external site, For a contact the LWC form is not loading when the same contact is trying to reload the site. It works in this way: If the contact is ...
Monica Venkatesan's user avatar
0 votes
0 answers
79 views

Async-safe mass delete of children with Batch

How to write in Apex a mass deletion (over 10 000 records, even up to 150 000) of related records that can be safely called from async context, like Batch? I have two custom objects, lets call them ...
zanstaszek9's user avatar
0 votes
0 answers
71 views

Record-Trigger flow run when Delete error

I'm trying to create a record-trigger flow on Asset delete. I tried getting CV value by formula but the related Account record is not returning correct value. I also tried get Account record ...
 Huy's user avatar
  • 1
0 votes
0 answers
124 views

Get a list of all deleted Journey

When I use this endpoint "GET /interaction/v1/interactions?status=Deleted" of Marketing Cloud API (documentation), I am not getting Journeys with status "Deleted" But when I use ...
Tom's user avatar
  • 9
0 votes
1 answer
187 views

LWC ShowToastEvent fire js function on link click

I have a LWC that shows a table of records with the classic 'actions' arrow. Among the available actions there is 'delete'. Which, when pressed, deletes the record and shows a successful toast. I ...
Teemo_smr's user avatar
  • 142
0 votes
0 answers
256 views

Bizarre Flow error when deleting records that were queried: ENTITY_IS_DELETED

I have a Platform-Event Triggered Flow which does the following: After insert of a Platform Event record... Get OpportunityLineItem records related to an Opportunity If the result of the above query ...
JustinF's user avatar
  • 423
0 votes
1 answer
695 views

Using Collection Filter to then be used in Delete Action (flow)

I'm building a Record Triggered - After Save flow. In the flow I have a GET element that is gathering all AccountTeamMember records with a specific Account Id. (getCurrentAccountTeamMembers) ...
ieatallthechips's user avatar
0 votes
1 answer
242 views

Delete every sObject record assigned to a user without specifying sObject

As far as I know this is not possible but, is there a way we can delete all records related to a User (without specifying its sObject) from Apex?
molinet's user avatar
  • 915
0 votes
0 answers
32 views

Salesforce fields recover options

New here, thanks for your help. I have salesforce cloud enterprise. We had a third party trying to setup their software for scheduling and it was done in the live environment not our sandbox. Issue is ...
Believenw's user avatar
0 votes
0 answers
314 views

Contact delete in Marketing cloud- Which account id we have to use if we have multiple business units in payload

Need a clarification in contact delete by lust reference. We have a parent BU (business unit) at the top of the tree, and one of the other BUs is TEST. In TEST we have created an Installed Package ...
DSK's user avatar
  • 1
0 votes
1 answer
211 views

Delete custom field for custom object from deleted fields without erasing one by one

When I delete custom fields of an custom object, the deleted custom fields goes to Deleted Fields, I need to empty this Deleted Fields I have about 500 fields I need to delete them once from Deleted ...
Frank's user avatar
  • 1
0 votes
1 answer
501 views

Delete old files in Salesforce - Apex class don't work

Hi I am trying to create an apex class which I could use to regulary delete old files in Salesforce. global class DeleteOldContentDocument implements Schedulable { global void execute(...
aniphant's user avatar
0 votes
1 answer
1k views

INSUFFICIENT_ACCESS_OR_READONLY Error on Order Items deletion, even though I am System Administrator

Even though I have a System Administrator profile assigned to me, and have the CRUD permissions on the Order Line Item Object, I am receiving the below error when I try to delete the Order Item ...
Akshay Vasu's user avatar
0 votes
0 answers
451 views

Update in Before Delete Trigger instead of deleting them shows strange behavior

I am working on a use case in which I have to update records instead of deleting them when deleting them. As per my understanding, we cannot achieve this easily without undeleting the same records. ...
Hariprasath's user avatar
0 votes
0 answers
2k views

Triggers on the Files Object

I have a trigger on the ContentDocument when all the files associated with the Parent record is deleted it should uncheck the check box field (Files_Exists__c) on Parent saying no files exists not. ...
user81642's user avatar
  • 667
0 votes
1 answer
1k views

You can’t delete this record choice set yet. Remove all references to the record choice set, and try again

You can’t delete this record choice set yet. Remove all references to the record choice set, and try again. I am trying to delete Account from the screen flow: No matter what I tried it does not let ...
Nathan's user avatar
  • 45
0 votes
1 answer
884 views

How to delete custom fields from Big Object?

How do I delete non-indexed custom fields on a Big Object ? I do not see a 'delete' option next to 'edit' option of a field.
Divyasshree's user avatar
0 votes
1 answer
282 views

Access parent object field in before delete trigger using SOQL?

We have a before delete trigger on QuoteLineItem and are trying to access one of Quote's fields using soql query on the quote line item with help of the id, but we are not able to get the field from ...
Isha's user avatar
  • 163
0 votes
0 answers
125 views

Automatically Deleting Test Lead records created by Ghost Inspector on Salesforce

We have deployed ghost inspector to automatically create leads to check for website downtime. The leads are created with a random email address that begins with "[email protected]&...
Amrit Singh's user avatar
0 votes
0 answers
1k views

Unable to delete a contact from Salesforce

I have a user with custom profile and has access almost similar to System Admin. So when that user is trying to delete a contact, the following error is displayed on the screen Your attempt to delete ...
SK_112's user avatar
  • 73