function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hari.gsHari.gs 

Save error: Unable to perform save on all files: No match found

Hi All,

 

The following code shows me an error message " Save error: Unable to perform save on all files: No match found " while saving the code.

 

global class DailyUpdateAccountsScheduler implements Schedulable{    
    global void execute(SchedulableContext SC) {
        list<Purchased_Products_del__c> purProd = [SELECT Account__c FROM Purchased_Products_del__c];
        set<Id> accIdSet = new set<Id>();
        if(purProd.size() > 0) {
            for(Purchased_Products_del__c pP : purProd) {                
                accIdSet.add(pP.Account__c);                
            }
        }        
        list<Account> accList = new list<Account>();
        list<Account> acctList = [select Name from Account];
        if(acctList.size() > 0) {
            for(Account accnt : acctList) {
                if(accIdSet.size() > 0) {
                    for(Id id : accIdSet) {
                        if(accnt.Id == id) {
                            accList.add(accnt);                            
                        }
                    }
                }
            }
        }        
    }
}

 

Can anyone please help me to resolve this. My ultimate aim is to update the list "accList".

The outer loop size ismore than 14000 and the inner loop is around 1050. Is this nested loop causing the problem .

 

Please help me.

 

Thanks and Regrds

Hari G S

bob_buzzardbob_buzzard

I wouldn't expect the loop to stop you saving the class, that should only kick in when the class is executed.  You do stand a good chance of breaching the maximum script statements with those volumes though.  Do you have any error decorators indicating where the problem is in the file?

kranjankranjan

Hi Hari,

 

I Agree with Bob. Though your code really seems to be having code loop holes to break limits. Also the objective you stated which you are implementing seems to be different. But all of these should not stop you from saving the file and should rather come on run time.

 

So if you can give more details about the error you are getting, it might be helpful.