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
LosintikfosLosintikfos 

Trigger

Hi Experts,

I am using an appex class with a method definition like this;
Code:
public class addParent{
   public static void addAddress(Account acc){ 
   /**Method function here**/
}
}

I am trying to use below trigger to fire up the apex class;

Code:
trigger addAddressTrigger on Account
                            (before insert) {
  addParent.addAddress(Trigger.new);
}

 Ufurtunatly i am getting Error:
Compile Error: Method does not exist or incorrect signature: addParent.addAddress(LIST:SOBJECT:Account)


Do anyone knows what i am doing wrong here?


Message Edited by Losintikfos on 09-22-2008 02:39 AM
micwamicwa
As the error msg tells you, the method signature is wrong. Tigger.new will always give you a list of sObjects.

Code:
public class addParent{
   public static void addAddress(List<Account> acc){ 
     /**Method function here**/
   }
}

 

LosintikfosLosintikfos
Thanks micwa,


Did as told and was able to eliminate the issue. The problem now is, i can't save the trigger to production because of the same error.


Do you know why?


Message Edited by Losintikfos on 09-23-2008 05:26 AM