• Swapnadip123
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Hi,

I am trying to send Email via Messaging.MassEmailMessage by  setting TargetObjectIds method.  Even though it specifies TargetObjectIds to be a list of IDs of the contacts, leads, or users to which the email will be sent.

 

I want to ensure whether PersonAccountId can be set to TargetObjectIds to send mass email.

So I am trying to assign a value to a property in my controller and it just is not working, the value always ends up as null... am I doing somethign wrong?

 

In My Controller

public Boolean blnDoAttachment{get; set;}

 

 <<Some Code>>

 

 if (blnDoAttachment == True){

return new PageReference('p/attach/NoteAttach?pid=/' + c.id + 'retURL=' + c.id); 

 

}

if (blnDoAttachment == False){

return new PageReference('/'+ c.id);

}

return null;

 

On My VisualForce Page

<apex:commandButton action="{!save}" value="Submit"><apex:param value="False" assignto="{!blnDoAttachment}"/></apex:commandButton> <apex:commandButton action="{!save}" value="Submit and Attach"><apex:param value="True" assignto="{!blnDoAttachment}"/></apex:commandButton>

Any assistance would be greatly appreciated.  I am pretty sure its just something totally stupid on my part

 

Thanks!

 

Message Edited by RickoT1031 on 03-09-2010 04:27 PM