You need to sign in to do that
Don't have an account?
soql related
hi friends
can anyone tell me...
what is the error we get when we use soql quiry in any for loop?
thnks
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
hi friends
can anyone tell me...
what is the error we get when we use soql quiry in any for loop?
thnks
All Answers
Hi,
There could be different types of error. Let me know your specific question if any.
Happy to help you!
It won't show any error. But when you try process records in bulk format (Inserting/Updating more than 200 records in a single transacation ) it can't process that in single go .
So We need to pull all the records in the single query outside of Loop Statement and Process the List of records for DML Operation.
Kindly let me know incase you need more question on this.
Hi,
You need to query list of records inside for loop and your problem will be solved. Look at below code snippet I have queried list of account records and updated that, so you don't need to run DML outside for loop query.
Let me know if you have any specific question around this.
Happy to help you!