Skip to main content

#DML Statements0 discutindo

Hi all,

Since USER_MODE is out of beta in Spring 23, I am looking forward to change all of my FLS and object permissions checks with USER_MODE access level for all my database operations.

My question is, as an ISV, will security review accept this check? or is there something else I still need to take care of?

 

Thanks

#Security #Apex #FLS #Object Permissions #DML Statements

5 respostas
0/9000

Scenario: We are running an Apex block with Database.Insert and the number of DML statements hit the governor limit. In this case, would the first 100 records get saved or the entire transaction would fail?

5 comentários
0/9000

Regarding the topic of DMLs and governor limits, scenario 1 (Database.update within for-loop) is bad because you may run into the limit of 150 DML statements.  Scenario 2 (Database.update after single for-loop) is bad, I think, because you may run into the 10,000 DML rows limit.

 

The recommended scenario 3 has two for-loops and a Database.update after the inner for-loop. Since the number of allowed DML statements per transaction is 150 and the for-loop chunks up the returned data into batches of 200, does this mean the theoretical limit then is 30,000 rows (150 x 200)?

 

So if more than 30,000 query rows were to be returned (and less than 50,000), would a batch process need to be called? @Andres Perez (ELTORO.it) @ELTOROIT Friends 

3 comentários
0/9000