• All Finance Deals
  • 0 Points
  • Member since 2022

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2
Hi Guys,

I am trying to create a validation rule where if I pick a country a state would be required.  
Can someone please help me out. (both fields are pick lists)
Hi all,

I have some apex code that looks like the code below. In my test class, I have a testMethod for successful execution, but I'm having trouble creating a testMethod for the exception. I've been able to trigger the exception, but the test is marked as Fail and I recieve "System.AuraHandledException: Script-thrown exception". As a result, I'm not getting code coverage for this exception.

How can I successfully test an AuraHandledException from a testMethod without breaking the test and having it result in a Fail?
   update account;
catch(Exception e){
   throw new AuraHandledException('error updating account');