• Alex Myers
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies
I'm trying to write a trigger that calls a method for a specific set of records. I'm pretty new to Apex, so sorry if this is a dumb question! I'm getting a Compile Error: Invalid Type: ReversalUtils (which is my class) at line 15 column 27. The class I'm trying to call (ReversalUtils) isn't editable to me.

trigger testrev on Opportunity (after update) {

String datestr = '01/01/2011';
Date datestr2 = date.ValueOf(datestr);

Map<Id, Opportunity> oppsmap = new Map<Id, Opportunity>();

   //put them all in a list
   List<Opportunity> results = new List<Opportunity>();
 
   for (Opportunity o: [SELECT Id, cv__Posted__c, CloseDate 
                       FROM Opportunity
                       WHERE Id in :oppsmap.keySet()AND cv__Posted__c = true]) {
       
cv.ReversalUtils rs = new ReversalUtils();
rs.reverseGiftsWithErrorReporting(o);

       }}

Thank you!!
I'm trying to write a trigger that calls a method for a specific set of records. I'm pretty new to Apex, so sorry if this is a dumb question! I'm getting a Compile Error: Invalid Type: ReversalUtils (which is my class) at line 15 column 27. The class I'm trying to call (ReversalUtils) isn't editable to me.

trigger testrev on Opportunity (after update) {

String datestr = '01/01/2011';
Date datestr2 = date.ValueOf(datestr);

Map<Id, Opportunity> oppsmap = new Map<Id, Opportunity>();

   //put them all in a list
   List<Opportunity> results = new List<Opportunity>();
 
   for (Opportunity o: [SELECT Id, cv__Posted__c, CloseDate 
                       FROM Opportunity
                       WHERE Id in :oppsmap.keySet()AND cv__Posted__c = true]) {
       
cv.ReversalUtils rs = new ReversalUtils();
rs.reverseGiftsWithErrorReporting(o);

       }}

Thank you!!