• SARVESH SHARMA 6
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Lightning Component Framework Specialist Superbadge Step 6 Issue
Lightning Specialist Superbadge Issue
Hi All,
Can anyone guide me regarding developer certification PD1., How to prepare for it.

Thanks
I am trying to call the class from trigger... getting the error 'Method does not exist or incorrect signature: void acctphoneupdate(List<Account>) from the type AccClass1'. Pls help in resolving this issue.

I have the following Class

public class AccClass1 {
           public static acctphoneupdate(List<Account> Acc) {
//        list<Account> Acct = [Select Phone from Account];
//            for ( Account Acc : Acct) {
                if (Acc.phone == '4001002000')
                {
                    Acc.phone = '4040404040';
                    insert Acc;
                }
//            }
    }
}

I have the trigger as below:

trigger Acctrigger1 on Account (before insert) {
    AccClass1 first = new AccClass1();
    first.acctphoneupdate(Trigger.new); <--- This is the line of code having issue. 
}
  • April 08, 2018
  • Like
  • 0