• MissaTXREGN
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies

I have a page and class that I have written the end user will select an account.  Which creates a Parent Interaction on the Interaction Object.  From there, the end user can creat multiple interaction activities associated to the Parent Interaction.  I need to associate Interaction Participants (many) to the Interaction Activity and then save the participants (on object Interaction_Participants).  Different Particpants can be selected per each Interaction Activity.  The Participants need to be selected from the Contacts associated to the Account that was selected at the beginning. However, I am struggling with this last piece.  Below is my class.  I have stripped everything associated to Interaction_Participants out as it is erroring no matter what I try.  Any help isappreciated.  I'm running up a deadline and this is driving me nuts. 

 

public class InteractionsController {

/*------------------------
Private Variables 
------------------------*/


private Map<String, List<Interaction_Activity__c>> IAMap = new Map<String, List<Interaction_Activity__c>>();
private List<Interaction_Activity__c> pInt = new List<Interaction_Activity__c>();
private List<Interaction_Participant__c> IP = new List<Interaction_Participant__c>();
private String retUrl;

public Interaction__c InteractionRequest {get; set;}

integer cnt = 0;





/*------------------------
Consructor 
------------------------*/

public InteractionsController() {

ID accountId = ApexPages.currentPage().getParameters().get('accountId');


InteractionUtil IntU = new InteractionUtil();
InteractionRequest = IntU.queryInteraction(accountId);


   



        
InteractionRequest = new Interaction__c(Account__c =accountId);

if (accountId != null)
retUrl = '/' + accountId;
       




}



public List<Interaction_Activity__c> IA {
get {
return pInt;
}
private set;
}


/*------------------------
Private Methods 
------------------------*/




public PageReference Ints() {
return Page.Interactions;
}

public PageReference addCreate() {



 insert pInt;
 cnt = cnt + 1;
 
  
return null;


}


public PageReference addActivity() {

 if(cnt == 0) {
 insert InteractionRequest;
 pInt.add(new Interaction_Activity__c(Interaction__c=InteractionRequest.id));
 insert pInt; 
 cnt = cnt + 1;
 
 return null;
 }
 
 else
 
 { upsert InteractionRequest;
 pInt.add(new Interaction_Activity__c(Interaction__c=InteractionRequest.id));
  upsert pInt; 
 
  
return null;


}
}


public PageReference submit() {




upsert pInt;


return null;
}



public void addrowIA() {
pInt.add(new Interaction_Activity__c(Interaction__c=InteractionRequest.id));
} 



}

 

I need to render a field based on values in a multi select picklist.  Basically if it contains Special Project, then render the special project field.  However, I can't use includes in the render formula or so says the error message.  Here is what I'm using.  Is there another way to do this?

 

 <apex:pageBlockSectionItem rendered="{!Includes(InteractionRequest.Interaction_Type__c, 'Special Project')  }">
                           
<apex:outputLabel value="Special Projects" for="{!InteractionRequest.Special_Projects__c}"/> 
     <apex:inputField value="{!InteractionRequest.Special_Projects__c}" required="false" />

</apex:pageBlockSectionItem>  

 

Okay, this is probably simple but for the life of me, I can't figure out how to do this.

 

I need to a picklist to display as checkboxes in my visualforce page.  I need the box that is checked to save to the picklist value field.  Does anyone have any sample code.  

 

Thanks in advance. 

Okay, this is probably simple but for the life of me, I can't figure out how to do this.

 

I need to a picklist to display as checkboxes in my visualforce page.  I need the box that is checked to save to the picklist value field.  Does anyone have any sample code.  

 

Thanks in advance.