[Solved] “Access to entity ‘MatchingInformation’ denied” on batch

user18645 Asks: “Access to entity ‘MatchingInformation’ denied” on batch
I have a batch that’s been running for years that started failing because of First error: Access to entity ‘MatchingInformation’ denied. I’ve searched around and can’t find anything about this and I can’t find any object or class in salesforce called MatchingInformation. It doesn’t happen each time this batch runs, it seems to be arbitrary and can happen with any set of arguments. The batch is below, simply it updates a list of records with a defined value.

Code:
global class util_sObjectFieldUpdaterBatch implements Database.Batchable<sobject>, Database.Stateful {

    /**
    Run This Batch

    string query = ;
    string nextBatch = ;
    string sObj = ;
    string field = ;
    object changeTo = ;
    integer batSize = ;

    ID idBatch = Database.executeBatch(new util_sObjectFieldUpdaterBatch(query,nextBatch,sObj,field,changeTo), batSize);
    **/

    global string query;
    global string nextBatch;

    global string sObjName;
    global string sObjFieldName;
    global sObjectType sObjType;
    global sObjectField sObjField;

    global object changeTo;

    private Map<String, Schema.SObjectType> smap = Schema.getGlobalDescribe();

    global integer NumBatches;

    global util_sObjectFieldUpdaterBatch(String qry, string nextBat, string obj, string field, object changeObj) {

        Query = qry;

        nextBatch = nextBat;

        sObjName = obj;

        changeTo = changeObj;

        SObjectType sObjType;

        if(smap.get(obj) != null){

            sObjType = smap.get(obj);

            Map<String,Schema.SObjectField> fieldMap = sObjType.getDescribe().fields.getMap(); 

            if(fieldMap.get(field) != null){

                sObjFieldName = field;

                sObjField = fieldMap.get(field);

            }

        }

    }

    global Database.QueryLocator start(Database.BatchableContext bcMain) {
        return Database.getQueryLocator(Query);
    }

    global void execute(Database.BatchableContext bcMain, List<sObject> scope) {

        for(sObject s : scope){
            s.put(sObjField, changeTo);
        }

        if(scope.size() > 0) { 
            update scope; 
        }
    }

    global void finish(Database.BatchableContext bcMain) {

    } 

}

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.