So,
Currently doing code maintenance for my org.
i NEVER touched any part of this code or apex class but somehow it is throwing an error after working just fine.
List<PO_Invoice__share> newListToInsert = new List<PO_Invoice__share>();
the error "Invalid type: PO_Invoice__share" shows up for this one, even though PO_Invoice__c is controlled by it's parent, which is private. So I don't know why PO_Invoice__share is all of the sudden randomly not working. I never even touched this line of code.
Then I get an error on this line of code saying "Variable does not exist: OwnerId"
for(PO_Invoice__c invoice: newList){
if(oldMap == null || (oldMap != null && invoice.Company_FF__c != oldMap.get(invoice.Id).Company_FF__c) || (oldMap != null && invoice.OwnerId != oldMap.get(invoice.Id).OwnerId)){ //Updated by Purnima for Story S-570738
purchaseId.add(invoice.Id);
}
}
anyone know why this is happening? I have no clue because nothing was changed.