Skip to main content

public class AccountHandler { 

 

    public static Account insertNewAccount(String accountName) { 

        try { 

            Account acc = new Account(Name = accountName); 

            insert acc; 

            return acc; 

        } catch (DmlException e) { 

            return null; 

        } 

    } 

} 

This is my code and i am getting this error 

 

 

 

 

#Trailhead Challenges

2 risposte
  1. 4 ago, 07:30

    Hello Ashwini, 

     

    Please try disabling the Account_Number_8_Characters validation rule that you created in the previous Formulas and Validation Rules topic. Alternatively, if you want to keep the validation rule enabled, make sure to enter a valid Account Number that satisfies the validation rule.