• Dhairya Shah 15
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Challenge Not yet complete... here's what's wrong: 
The 'Days_Since_Last_Update__c' formula field did not return the correct number of days between an Account’s Last Activity Date and today.

i m having this error so i think i am using wrong data type for LastActivityDate so please help me out
<code>

public class AccountHandler{
    
public static Account insertNewAccount (String accName){ 

   if(accName!=''){    
       try{
           Account a = new Account(Name=accName);
           insert a;
           System.debug('Bravo User5633! Account created');
           return a;
       } catch(Exception e){
           System.Debug('Account not created');
           return null;
       }
   } else {
       return null;
   }
}
}    

</code>    

Challenge Not yet complete... here's what's wrong: 
Executing the 'insertNewAccount' method failed. Either the method does not exist, is not static, or does not insert the proper account.
<code>

public class AccountHandler{
    
public static Account insertNewAccount (String accName){ 

   if(accName!=''){    
       try{
           Account a = new Account(Name=accName);
           insert a;
           System.debug('Bravo User5633! Account created');
           return a;
       } catch(Exception e){
           System.Debug('Account not created');
           return null;
       }
   } else {
       return null;
   }
}
}    

</code>    

Challenge Not yet complete... here's what's wrong: 
Executing the 'insertNewAccount' method failed. Either the method does not exist, is not static, or does not insert the proper account.