You need to sign in to do that
Don't have an account?
Shuhbam Sinha
how to call method from another method multiple times
Hello,
I have one method where i am inserting 10 records at a single time . Now I want after all the record is inserted then another method should be fired for all the inserted Ids at that time only . I dnot want to use for loop as the another method is having soql and some dml operations. please suggest another way. Thanks in advance.
I have one method where i am inserting 10 records at a single time . Now I want after all the record is inserted then another method should be fired for all the inserted Ids at that time only . I dnot want to use for loop as the another method is having soql and some dml operations. please suggest another way. Thanks in advance.
// below I am inserting the records if(!recordUpdate.isEmpty()){ for (Case multipleRecords : recordUpdate){ //updateChecklistRecords.putall(multipleRecords); lstUpdateChecklistRecords.add(multipleRecords) ; } } if(lstUpdateChecklistRecords.size()>0){ insert lstUpdateChecklistRecords; } // calling the another method for(Case insertedRecord : lstUpdateChecklistRecords){ System.debug('case>>>'+insertedRecord.id); AccountClass.bankload(insertedRecord.Id) // another method. }
Here's a suggestion based on your requirements:
Sample code
Hope this helps,Thanks