People who code: we want your input. Take the Survey

Questions tagged [delete]

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

Filter by
Sorted by
Tagged with
-2
votes
3answers
55 views

How can I clear the database entries for a specific object? [duplicate]

I added a custom object and some fields. I also added several entries to the database for this object. Can I delete certain entries or all of them at once that relate to my object in some predefined ...
0
votes
0answers
23 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 ...
0
votes
1answer
33 views

Prevent deletion and update the records - Trigger

I have a need to kind of customize the deletion of a custom object. The deletion need to update a checkBox to true instead of really delete the record. For that I tried many things using trigger ...
0
votes
0answers
46 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. ...
0
votes
1answer
39 views

Removing metadata in a DX unlocked package using --upgradetype Delete is not working

we have an unlocked package (mypkg) that has a folder with some metadata no longer in use by the org and we just want to remove it. Here are my steps: I went to 'mypg' installed package detail in the ...
1
vote
0answers
16 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....
0
votes
0answers
11 views

Why test class not covering the execute Database.batchable where I am deleting the list returned from the query locator? [duplicate]

global with sharing class JunkQueueBatchJob implements Database.Batchable<sObject> { global Database.QueryLocator start(Database.BatchableContext BC) { String query = 'select ...
0
votes
0answers
337 views

Can't delete flow version because it's referenced by deleted flow interviews

I'm trying to delete a flow version and I'm getting below error This flow version is referenced elsewhere in salesforce.com. Remove the usage and try again. Flow Interview and when trying to access ...
0
votes
1answer
20 views

Cannot remove global picklist after deletion picklist

I am trying to delete a global picklist but this references a deleted picklist. How do I resolve this?
0
votes
0answers
36 views

Winter '21 update and failure in web-to-lead flow

I'll describe a series of actions that has been functioning 100% as expected in our org for a couple of years now and point out the issue Leads come in via web-to-lead along with a campaign Id and a ...
0
votes
1answer
55 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 ...
0
votes
2answers
40 views

Deletion of records who created it

For example am the owner of the record then only i should be able to delete the record, And i should not be able to delete records created by others.I cant give ModifyAll permission to that profile as ...
0
votes
1answer
53 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.
0
votes
1answer
57 views

Is it possible to delete a managed package completely from packaging org?

I have created a managed package that has 5 versions and now want to delete it entirely from this org. Is it possible? The package is not installed in any other org. The deprecate option appears for ...
0
votes
1answer
39 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 ...
0
votes
0answers
53 views

Deletes rows in a data extension Error SSJS

Can someone please help me? I want to delete data from Data Extensions, and I tried different variations. But unfortunately, it didn't work. For info I have so far used variant 1 without any problems. ...
3
votes
1answer
274 views

Easy way to tell which objects will utilize IsDeleted flag?

It seems most objects, when deleted, will get their record updated with IsDeleted = true while they stay in the recycle bin until they're purged. However, we have found some objects just get ...
2
votes
1answer
51 views

How can you delete a PlatformEventChannelMember record via the REST api?

I am trying to configure Change Data Capture for the ChangeEvents channel via the REST API as you can in Setup Change Data Capture when using the Salesforce UI. I am able to add records of ...
0
votes
3answers
53 views

I want to delete last letters of existing Contacts using Batch class. Is it possible? I want to delete all “sfdcpoint” letters

global class BatchApexExample implements Database.Batchable<sObject> { global Database.QueryLocator start(Database.BatchableContext BC) { // collect the batches of records or objects ...
0
votes
1answer
56 views

Delete a row in Lighting Component Table

I am getting started with Lighting Components and build my own first tabe. I am displaying all quotedocuments from all quotes on the opportunity level so that our sales sees all documents in one table ...
0
votes
0answers
114 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 ...
3
votes
1answer
254 views

Error: Cascade dereferencing too many records

Let me briefly describe data model to provide more clarity over the target error. There are 3 objects: X, Y, and Z. Z is related to Y via master-detail relationship. Z is related to X via lookup ...
0
votes
2answers
55 views

How can I call all Cases using SOQL query to mass delete all my Case's?

This is my code to mass delete my Cases: List<Case> caseList=[Select CaseNumber From Case]; for(Case cases : caseList); delete caseList;
0
votes
0answers
35 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 "ghostinspector+XXXXX@gmail.com&...
0
votes
1answer
107 views

How to delete a ContentDocumentLink

I wan't to create a ContentDocumentLink and delete him in an other function, i tried this code: // function of creation: ContentDocumentLink cdl = new ContentDocumentLink( ContentDocumentId = doc....
4
votes
3answers
335 views

Mass delete Debug logs using Salesforce DX

In my developer sandbox the Apex logs count has exceeded beyond its limit and there are more than 1 lakh records created in it. I want to mass delete them, but not able to do so. I am using the ...
0
votes
0answers
16 views

duplicate value found: <unknown> duplicates value on record with id: <unknown> Error when deleting a record

Have you experienced receiving this error when deleting a record? I googled but mostly of the related issue is during upsert or deployment. I disabled the duplicate rules, process builders, and no ...
0
votes
1answer
44 views

ERROR: must implement the method: System.Iterable<SObject> Database.Batchable<>.start(Database.BatchableContext)

global Class Batchsample implements Database.Batchable<Attendance__c>{ global Database.QueryLocator start(Database.BatchableContext BC){ String Query = 'select id,Login_Date_c,...
0
votes
0answers
51 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 ...
0
votes
0answers
99 views

How to truncate Big Objects?

I have a Big Object where the index is built as String, String, Datetime. I'm now faced with truncating records so I don't create more records than my current limit, 1 million without additional ...
0
votes
1answer
66 views

I am trying to delete an object in my trailhead playground to re take a lesson and get the following errors

Is there way to delete an object like a delete cascade approach. thx Reason Section This custom object is used by another feature. Remove the usage and try again. Apex Class This custom object is ...
0
votes
1answer
260 views

Can't access MasterRecordId field when merging Cases

SUMMARY: I am currently implementing Merge Cases functionality and need to be able to edit fields on the losing and winning record during this process. Looking at the documentation depending on ...
0
votes
0answers
111 views

addError() method behavior on FeedItem trigger

I've written a basic trigger on FeedItem, which restricts users not to delete their chatter posts (simplified to clarify my question). trigger beforeDeleteFeed on FeedItem (before delete) { ...
0
votes
1answer
15 views

Problem with IN Clause in soql

Hi everyone I'm having a problem with a query over campaignmember object, Im trying to use In clause to filter by id , but it retrieves nothing, crazy thing is that the list actually has an id, and it ...
1
vote
1answer
119 views

How to remove Salesforce CRUD Delete Security Risk?

When I scanned my app yesterday, and it raised a bunch of CRUD Delete security issue. So, I added isDeletable() check to all the delete query, and scanned it again. Still, it showed the same security ...
0
votes
0answers
27 views

Create select all checkbox such that if select all is done then all attachments must get selected

Below is my VF Page and i need to create select all checkbox such that if select all is done then all attachments must get selected and then user can delete them at a go. VF PAGE <apex:page ...
-1
votes
1answer
91 views

Records being randomly deleted

I was informed of some weird behavior of some custom records missing from our SF instance and after a little research I found that all of these missing records had been moved into the recycling bin ...
1
vote
1answer
26 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 ...
0
votes
1answer
80 views

How Do I Delete an Email from Content Builder Using REST API?

I can create an email with the REST API but I do not know how to delete one and I cannot find any information about it. Thanks for your help!
0
votes
1answer
97 views

Delete child record if a field of parent is updated using trigger

My code is: trigger ClassCustomStatus on Class__c (before update) { Set<Id> classSet = new Set<Id>(); for(Class__c c : Trigger.new){ if(c....
0
votes
1answer
214 views

After Deleting Parent Object in Master-Detail relation, what happens to the triggers we have created in child object

In a master detail relationship in child object if we created trigger on child object after delete.when parent is deleted will the trigger execute?
0
votes
1answer
26 views

Can you query where contacts come from or add a filter to prevent deleted contacts from coming back?

I have been monitoring my all contacts and it has been jumping 10000+ every day. I doubt these are authentic contacts Is it possible to somehow do a query of where these contacts are coming from? ...
0
votes
1answer
52 views

How to clone trigger.newmap when passing into a trigger hanlder [closed]

I was wondering how to clone trigger.newmap or how to still have access to the references associated to it when I want to pass this into a trigger handler.
2
votes
1answer
879 views

Delete classes/trigger from Prod via VSCode

I need to delete classes and a trigger from prod via VSCode. I have retrieved the according classes/trigger via package.xml into VSCode. There is the command "SFDX: Delete This from Project and Org", ...
3
votes
1answer
422 views

Scratch Org Limit Exceeded, Not Visible In Dev Hub

Today, while trying to deploy a fresh scratch org, I received a familiar error. The signup request failed because this organization has reached its active scratch org limit Typically the way to ...
0
votes
0answers
91 views

Stop Autolaunched Flow when Object Deleted

We are using Autolaunched Flows, many of which include Pauses of several days. Because of the Pauses, many Flows are throwing errors because the Objects that triggered them (via Process Builder) get ...
0
votes
1answer
342 views

Prevent child deletion when parent is status in Approved or Review and show error message on Parent

I have Master detail relation ship. I have written a trigger on child object to prevent the deletion of child when parent is in Approved or Inreview status and throw error message which is working ...
0
votes
3answers
198 views

Override Standard Delete Action on Account Object

how can i override standard delete action on Account with a Lightning component? I use Lightning Experience and i want when user selects delete action to show a message "Delete accounts is not ...
0
votes
1answer
31 views

Mass delete code worked last week, but now doesn't

I've got to delete 5 million records and I'm trying to delete 900,000 records for each click, using batch Apex. The code works in sandbox and worked in the production org last Thursday, but is now ...
-1
votes
1answer
74 views

Code coverage for delete statement in batch class [duplicate]

How can I get increased coverage for this code? I get only 75% so far. Not able to cover the delete statement in the main class. Any help is greatly appreciated. Main Class: public void execute(...

1
2 3 4 5