• Kumar Prasanna
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi everyone,
I am getting an error on below mentioned line when compiling in an apex class but it runs in Execute Anonymous Window :

msg.setTreatTargetObjectAsRecipient(false);

Error : Save error: Method does not exist or incorrect signature: [Messaging.SingleEmailMessage].setTreatTargetObjectAsRecipient(Boolean).
Kindly help. Thanks in advance.