You need to sign in to do that
Don't have an account?
Sohan Rawat 5
Need help in below queries
List<Merchandise__c> ml= [select id, Name from Merchandise__c]; As long as I understand with this query that it retrieves all the merchandise and then stores them in a list ml. I'm confused with below for query for query also does the same thing then how it is different. I was just reading this under best practice or recommended one as this retrieves the record in chunks of 200. Can anyone explain me here how this for loop retrieves record in 200 chunk.
and
for(List<Merchandise__c> ml : [select id, Name from Merchandise__c])
{
}'
Thanks
and
for(List<Merchandise__c> ml : [select id, Name from Merchandise__c])
{
}'
Thanks
Thanks
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_loops_for_SOQL.htm
That link was helpful and answered most of my questions
Do you have any idea on my other query or a helpsite link for system.assert exception details
Example:
Account ac=new Account(name=’<someAccount>’);
Insert ac;
Account acc=[select id,name from account where id=:ac.id];
System.assertEquals(acc.name, ‘<someAccount>’);
You can view all assert methods in the below link:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_system.htm