• Raju I 5
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies
Hi help me out
trigger  test on Account (before insert, before update,after insert)
{  
List<Customer_Info_Form__c> lst = new List<Customer_Info_Form__c>();
        for(Account acc : trigger.new){
        
             list<Customer_Info_Form__c> con= [ select  Contact_Number__c,Email__c, Customer_Account__r.Name from  Customer_Info_Form__c where
  id in:trigger.new]
                   //Customer_Info_Form__c con = new Customer_Info_Form__c();
                   
                   for(Customer_Info_Form__c c1 : con)
                   {
                        if(Customer_Account__r.Name== acc.Name )
                         {
     
                       c1.Contact_Number__c = acc.PersonMobilePhone;
                       
                         c1.Email__c = acc.CG_Email_ID__c;
                     }
                        con.add(lst) ;
                       
            
        update  lst;
       
      
       }
       }
trigger  test on Account (before insert, before update,after insert)
{  
List<Customer_Info_Form__c> lst = new List<Customer_Info_Form__c>();
        for(Account acc : trigger.new){
        
             list<Customer_Info_Form__c> con= [ select  Contact_Number__c,Email__c, Customer_Account__r.Name from  Customer_Info_Form__c where
  id in:trigger.new]
                   //Customer_Info_Form__c con = new Customer_Info_Form__c();
                   
                   for(Customer_Info_Form__c c1 : con)
                   {
                        if(Customer_Account__r.Name== acc.Name )
                         {
     
                       c1.Contact_Number__c = acc.PersonMobilePhone;
                       
                         c1.Email__c = acc.CG_Email_ID__c;
                     }
                        con.add(lst) ;
                       
            
        update  lst;
       
      
       }
       }
<apex:page Controller="c7">
<!---<apex:page  contentType="c7">-->
 <apex:form >
 <apex:pageBlock title="My Search1">
 <apex:inputText value="{!keyword}"/>
 
 <apex:commandButton value="search" action="{! search_now}"/>  
 <apex:pageBlockTable value="{!results}" var="r">
  <apex:column value="{!r.NAME}"/>
  <apex:column value="{!r.TYPE}"/>
  <apex:column value="{!r.PHONE}"/>
 </apex:pageBlockTable>
 </apex:pageBlock>
 </apex:form>
</apex:page>
and apex

public class c7{

string keyword ;
List<account> results;
//public <account> results{get;set;}
public  string getkeyword()
{

Return Keyword;
}

Public List<account> getresults()
{

 return results;
 }
 
 //piblic  void setKeyword (string input)
 
  public void setkeyword (string input)
 {
  string keyword = input;
 }
 
 public pagereference search_now()
 {
 results=(list<account>)[FIND:keyword IN ALL FIELDS RETURNING account(NAME,PHONE)][0];
 return null;
 
 }
 }
Hi help me out
trigger  test on Account (before insert, before update,after insert)
{  
List<Customer_Info_Form__c> lst = new List<Customer_Info_Form__c>();
        for(Account acc : trigger.new){
        
             list<Customer_Info_Form__c> con= [ select  Contact_Number__c,Email__c, Customer_Account__r.Name from  Customer_Info_Form__c where
  id in:trigger.new]
                   //Customer_Info_Form__c con = new Customer_Info_Form__c();
                   
                   for(Customer_Info_Form__c c1 : con)
                   {
                        if(Customer_Account__r.Name== acc.Name )
                         {
     
                       c1.Contact_Number__c = acc.PersonMobilePhone;
                       
                         c1.Email__c = acc.CG_Email_ID__c;
                     }
                        con.add(lst) ;
                       
            
        update  lst;
       
      
       }
       }
trigger  test on Account (before insert, before update,after insert)
{  
List<Customer_Info_Form__c> lst = new List<Customer_Info_Form__c>();
        for(Account acc : trigger.new){
        
             list<Customer_Info_Form__c> con= [ select  Contact_Number__c,Email__c, Customer_Account__r.Name from  Customer_Info_Form__c where
  id in:trigger.new]
                   //Customer_Info_Form__c con = new Customer_Info_Form__c();
                   
                   for(Customer_Info_Form__c c1 : con)
                   {
                        if(Customer_Account__r.Name== acc.Name )
                         {
     
                       c1.Contact_Number__c = acc.PersonMobilePhone;
                       
                         c1.Email__c = acc.CG_Email_ID__c;
                     }
                        con.add(lst) ;
                       
            
        update  lst;
       
      
       }
       }

I'm trying to get a value of a flow variable. I'm following this: http://www.salesforce.com/us/developer/docs/pages/Content/pages_flows_getting_values.htm

In the doc it specifies I need a vairable for my flow in my controller and specify that variable on the visualforce page with interview="{FlowVariable" 

I've done this, but when I launch the flow from the visualforce page my flow variable is null.

What am I missing? From what I can tell I got everything set right and it should work.

 

<apex:page standardcontroller="Opportunity" extensions="Closed_Won_Pathway_ext" >
<flow:interview name="FlowName" finishLocation="{!IAmFinish}" interview="{!myFlow}" >
    	<apex:param name="varOppID" value="{!Opportunity.id}"></apex:param>       
    </flow:interview>
</apex:page>
and the controller
public class Closed_Won_Pathway_ext {
    private final Opportunity opty; //final opportunity where the flow is started
    public string RecordID;
    
    public flow.Interview.Close_Won_This_Opp myFlow {get;set;}
    
    //constructed
    public Closed_Won_Pathway_ext(ApexPages.standardController con){
        this.opty = (Opportunity)con.getRecord();       
    }
    
    //get the contractid from the flow
    public string getRecordId(){        
        system.debug('myflow: ' + myFlow); //This is Null       
        system.debug(myFlow.varContractID); //This is a null pointer error
        return myFlow.varContractID;
    }
    
    //finish location
    public pagereference getIAmFinish(){
        PageReference thePage = Page.Celebrate;        
        thePage.getParameters().put('id',getRecordId());
        
        return thePage;
    }

}