• RenatoF
  • NEWBIE
  • 0 Points
  • Member since 2022
  • El padre

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hello, I'd like to know how can I get the debug log file from a Queueable class that got executed in past days. I have this Queueable apex class that sends an account to this external system and then creates the account with the data from that system in SF. Is any form to debug that Queueable class? I just have the apex job Id from Apex Jobs
User-added image
Hello, I'd like to know how can I get the debug log file from a Queueable class that got executed in past days. I have this Queueable apex class that sends an account to this external system and then creates the account with the data from that system in SF. Is any form to debug that Queueable class? I just have the apex job Id from Apex Jobs
User-added image
Hi,
I have a scenario where if we insert two account at a time with same phone no then delete one account..
I tried below Trigger but there problem is if i am inserting one account with existing account phone no then it is working fine but on the insertion of two account it's not working...
can someone please help me...
trigger DelOneAcc on Account (before insert) {  
    // Here i am storing phone of account into set
    Set <String> phoneSet = new Set<String>();      
    // Iterate through each Account and add their phone number to their respective Sets   
    for (Account Acc:trigger.new) {        
        phoneSet.add(Acc.phone);         
    }      
    // New list to store the found phone numbers  
    List <Account> AccList = new List<Account>();      
        
    AccList = [Select Id, Name, Phone from account WHERE phone IN :phoneSet];     
    // Iterating through each account record to see if the same phone was found     
    for (Account Acc:AccList) {        
        If (AccList.size() > 1) {                             
        }  
    }   
    delete AccList; 
}
Thank You in Advance