Questions tagged [allornone]

All-or-none database operations mean failure of a single record causes the entire collection to fail.

Filter by
Sorted by
Tagged with
1
vote
1answer
48 views

Lead Trigger and lead.addError()

I have this problem with triggers: We have integration with our backoffice to receive leads. Unfortunately, we can't change this integration. It sends the leads when when it shouldn't. On insert if ...
0
votes
1answer
28 views

Invalid entity type provided in the request on composite/tree/customObject

I'm trying to receive a POST call with multiple records of a custom object. I don't know if that's the best choice but i'm using /services/data/v47.0/composite/tree/CSVEnergyLead__c/ When i try to do ...
1
vote
1answer
83 views

Rollback of a transaction in case of Gov Limit Error while using AllOrNone false

Will the entire transaction be rolled back in case of Governor Limit exception if I have fired some partial saves done? e.g. if the gov limit exception of 100 SOQL is hit while execution of contact ...
0
votes
1answer
63 views

Duplicate ID in list causes whole UPDATE to fail although allOrNone is set to false

A duplicate ID in my list of SObjects "businessPartnerListToUpdate" Database.SaveResult[] saveResultList = Database.update(businessPartnerListToUpdate, false); causes an Exception to be thrown: ...
0
votes
1answer
41 views

Allow the insert of Custom Records even if some of them fail as duplicates

I want to ignore a bunch of records (Custom settings in fact) and want the transaction to ignore Duplicate errors. All other errors should make the insert fail. If a duplicate exists simply skip the ...
0
votes
2answers
952 views

How to get and rethrow Exception from Database.insert(list, false)

I am inserting record using the allOrNothing = false option to only rollback the transaction when a certain type of error occurs (Goal: Allow the insert of Custom Records even if some of them fail as ...
1
vote
1answer
50 views

Fields getting wiped after one format error

We have a pretty lengthy visualforce page where consultants fill out their account plan. Quite a few fields are of type number -- also date, which is less problematic. If the user fills out 40 fields ...
1
vote
1answer
244 views

AllorNone inside Before insert Trigger - Duplicate Checking

Can someone explain to me in very simple how the AllorNone works in a before insert trigger? I was under the assumption that AllorNone is default false. I have a before insert trigger that checks for ...
1
vote
1answer
158 views

All-or-none before insert - is it possible to maintain record changes between trigger attempts?

According to Bulk DML Exception Handling : Apex triggers are fired for the first save attempt, and if errors are encountered for some records and subsequent attempts are made to save the subset of ...
3
votes
1answer
131 views

allOrNone flag does not work when at least one record is locked

I am trying to create a reusable method which retries DML whenever record lock is detected. However, I noticed that even if you set database.update( collection, **false**) and there is at least one ...