+ Start a Discussion

it is possible to Mass submit approval process through apex code?

i tried mass submit approval process in apex code,it's working but only one record to submit at a time.see the below code,please help me on this
for(GE_LGT_EM_ComplaintLineItem__c con:selectedContactIds)
             system.debug('selected cli ids---->'+con.id);--------->here getting all selected records,but only one records going to submit succesfully.i need bulk submit?
                    Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
                    req1.setComments('Mass records Submitted from visulaforce Page! ');
                    Approval.ProcessResult[] processResults = null;
                    try {
                    processResults = Approval.process(req, true);
                    System.debug('final result--->'+processResults);
                    }catch (System.DmlException e) {
                    System.debug('Exception Is ' + e.getMessage());
Deepak Kumar ShyoranDeepak Kumar Shyoran
Please refere to below links where similar problem is listed.