1

I have the following:

List<QuickAction.SendEmailQuickActionDefaults> defaultsSettings = (SendEmailQuickActionDefaults:[QuickActionDefaults.actionName=Case.CC_Send_Email, QuickActionDefaults.actionType=Email, QuickActionDefaults.contextId=50023000001yVQUAA2, QuickActionDefaults.targetSObject=EmailMessage:{ParentId=50023000001yVQUAA2, CcAddress=, ToAddress=}, emailTemplateId=null, fromAddressList=(salesforce@test.com), ignoreTemplateSubject=null, insertTemplateBody=null, replyToId=null])

I need to test and assert ToAddress is null. I can't figure out how to access ToAddress. Below is what I have tried:

System.assertEquals(null, defaultsSettings.QuickActionDefaults.targetSObject.ToAddress);

What is the correct syntax to access ToAddress?

  • Did you try this System.assertEquals(null, defaultsSettings[0].QuickActionDefaults.targetSObject.ToAddress); – वरुण Jul 25 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.