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
0 votes
2 answers
696 views

Database class partial success can exceed governor limits?

I have a question about the partial success using database class. My question is, if i exceed governor limits. Will the whole transaction be rolleback or i'll have in the database the records that ...
Julian Gutierrez Caligaris's user avatar
1 vote
1 answer
367 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 ...
Anton Solomin's user avatar
0 votes
1 answer
583 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 ...
Héctor Cervera Panella's user avatar
2 votes
1 answer
497 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 ...
Saumya Ranjan Satapathy's user avatar
1 vote
1 answer
610 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: ...
SFDC Dev 27's user avatar
0 votes
1 answer
121 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 ...
Robert Sösemann's user avatar
3 votes
2 answers
4k 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 ...
Robert Sösemann's user avatar
1 vote
1 answer
66 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 ...
caseyjg's user avatar
  • 95
2 votes
1 answer
1k 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 ...
Hello World's user avatar
1 vote
1 answer
464 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 ...
Bart Juriewicz's user avatar
4 votes
1 answer
306 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 ...
dzh's user avatar
  • 4,076