• Pritam Patil 19
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 12
    Questions
  • 9
    Replies
Hello,

I am trying to pass selected picklist value to apex class dynamically using actionsupport, but when I check using debug logs I am getting the value as null. I need this value as I have to get data from query to populate another custom picklist.

Below is my code:
VISUALFORCE PAGE:
//FIRST PICKLIST
<apex:selectList size="1" id="ApplicationDrop" value="{!ApplicationVar}"  >
            <apex:actionSupport event="onchange" reRender="FBiasR" status="rend"/>
            <apex:selectOptions value="{!ApplicationOptions}"></apex:selectOptions>
  </apex:selectList>

//SECOND PICKLIST
<apex:selectList size="1" id="FBiasR" value="{!FBiasRVar}">
             <apex:selectOptions value="{!FBRItems}"></apex:selectOptions>
</apex:selectList>

APEX CLASS:
 public  List<SelectOption> getFBRItems() {
         system.debug('APPLICATION ------------->'+ApplicationVar);
         List<SelectOption> options = new List<SelectOption>();
         options.add(new SelectOption('None','None'));
         
         for(AggregateResult ar : [Select Recommendation__c from Fleet_Recommendation__c where Axle__c = 'Front' AND Tyre_Class__c = 'Bias' AND Application__c =:ApplicationVar GROUP BY Recommendation__c])
         {
         options.add(new SelectOption(String.valueOf(ar.get('Recommendation__c')),String.valueOf(ar.get('Recommendation__c'))));
         }
          return options;
   }


I have done this same functionality on another VF page there it is working correctly with the same code. Need Help!
Hi,

I am using inlineEditSupport for my PageBlockTable that renders a list, when I try to use standard save '{!Save}' it just refreshes the page with the same values. I have tried using Apex:actionFunction to pass the parameters to the class, but when I pass parameters to the JS the changed value of the field does not pass to the JS rather the original value is passed, so even if it updates it updates the same value.

How do I save the record?

Following is my code :
VISUALFORCE :
<apex:pageBlockTable value="{!RecentFleetListNew}" var="fleet" id="FleetTable">
        <apex:column headerValue="ID" style="cursor:pointer;">
            <apex:outputField value="{!fleet.Id}" ></apex:outputField>
        </apex:column>
        <apex:column headerValue="Load" style="cursor:pointer;">
            <apex:outputField value="{!fleet.Load_Classification__c}" ></apex:outputField>
        </apex:column>
         <apex:column >
        <apex:commandButton value="Save" id="SaveButton" onclick="GetAndPass('{!fleet.Id}','{!fleet.Load_Classification__c}')"/>       
        </apex:column>
 <apex:inlineEditSupport event="ondblclick" showOnEdit="SaveButton" />
</apex:pageBlockTable>

<apex:actionFunction name="passFleet" action="{!fleetUpdate}" reRender="FleetTable">
    <apex:param name="fId" value="" id="fleetParaOne"/>
    <apex:param name="fLclass" value="" id="fleetParaFour"/>            
 </apex:actionFunction>          

JAVASCRIPT :
    function GetAndPass(fid,fLclass){
    alert('In Function------>'+fid+'And this----->'+fLclass);
    passFleet(fid,fLclass);
    }

APEX CLASS :
public void fleetUpdate(){
        fleetId = Apexpages.currentPage().getParameters().get('fId');
        LoadPicklist = Apexpages.currentPage().getParameters().get('fLclass');
        
        Customer_Fleet__c CF = new Customer_Fleet__c();
        CF.Id = fleetId;
        CF.Load_Classification__c = LoadPicklist;
     update CF;
    }

The values appearing in the JS alert are the same as the values displayed in the table even though the JS is being called after the value is changed using inlineEdit.

Please HELP !

Thanks,
Pritam. 
Hello,

I am displaying questions on a VF page and their options in form of radio buttons, but when I try to get the selected values of all the radio buttons and insert them for each record, blank value is passed.
Following is my code :
VF PAGE :
<apex:page controller="DisplayController" sidebar="false">
  <apex:form >
        <apex:repeat value="{!Questions}" var="q">
          <apex:outputField value="{!q.Related_Question__r.Question__c}"/>
          <apex:selectRadio value="{!q.Related_Question__r.Selected_Value__c}" id="RadioButtonValue" >
             <apex:selectOptions value="{!Options}" ></apex:selectOptions>
          </apex:selectRadio><br /><br />
       </apex:repeat>  
     <apex:commandButton action="{!SubmitSurvey}" value="Save" title="Save"/>
  </apex:form>
 </apex:page>


APEX CONTROLLER :
public with sharing class DisplayController {

    Public Survey_Main__c mainobj{get;set;}
    Public Survey_Question_Table__c questobj{get;set;}
    Public Survey_Option_table__c optobje{get;set;}
    Public List<Survey_Main__c> mainList{get;set;}
    Public List<Survey_Question_Table__c> questList{get;set;}
    Public List<Survey_Option_Table__c> optList{get;set;}

    Public String SelectedValue{get;set;}

    Public DisplayController(){
        
    }

   Public List<Survey_Option_Table__c> getQuestions(){
    
        optList = [select id, name,Option_One__c,Option_Two__c,Option_Three__c,Option_Four__c,Option_Five__c,Answer__c, Related_Question__r.Question__c,Related_Question__r.Selected_Value__c,Related_Question__r.Related_Survey__c from Survey_Option_Table__c where Related_Question__r.Related_Survey__c = 'a0d28000001GVcw'];
        
        return optList;
    }


    Public List<SelectOption> getOptions(){
        questList = [select id, name, Question__c,Selected_Value__c,Related_Survey__c from Survey_Question_Table__c where Related_Survey__c = 'a0d28000001GVcw'];
        optList=[select id, name, Option_One__c,Option_Two__c,Option_Three__c,Option_Four__c,Option_Five__c,Answer__c, Related_Question__c from Survey_Option_Table__c where Related_Question__c =: questList];
        
        List<SelectOption> options = new List<SelectOption>();
          for(integer i=0;i<1;i++)
                 {
                 system.debug('++++++++++++++OPTION BLOCK+++++++++++++++'+optList[i]);
                 options.add(new SelectOption('Option One','Option One'));
                 options.add(new SelectOption('Option Two','Option Two'));
                 options.add(new SelectOption('Option Three','Option Three'));
                 options.add(new SelectOption('Option Four','Option Four'));
                 options.add(new SelectOption('Option Five','Option Five'));
                 }
          return options;
    }
   
   
   public PageReference SubmitSurvey() {
    
    for (Survey_Option_Table__c sqItem : getQuestions()) {
 if(sqItem.Related_Question__r.Selected_Value__c != null || sqItem.Related_Question__r.Selected_Value__c != ' '){
     
               //Inserting The Survey Result
               Survey_Result__c SurveyResult = new Survey_Result__c(
                      Answer__c = sqItem.Related_Question__r.Selected_Value__c,
                      Related_Question__c = sqItem.Related_Question__r.Id
                     );
               insert SurveyResult;
        }  else{

             ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please Select Atleast one value'));  
        }

    }
        return null;
}


Need help on this...Urgent !

Thanks.
Hello all,

I want to get different values of <apex:selectRadio> which is in <apex:repeat>. How do I acheive this?

In debug logs I can see the following :-
06:36:53.0 (30801063)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this.OptionOne|"One"|0x54e51697
06:36:53.0 (30901056)|SYSTEM_MODE_ENTER|true
06:36:53.0 (30931204)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
06:36:53.0 (30935083)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
06:36:53.0 (30944764)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this.OptionOne|"Four"|0x54e51697
06:36:53.0 (31041462)|SYSTEM_MODE_ENTER|true
06:36:53.0 (31075557)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:5
06:36:53.0 (31079500)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
06:36:53.0 (31088629)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this.OptionOne|"Three"|0x54e51697

'OptionOne' is the value passed from <apex:selectRadio>, and I want all the values that 'this.OptionOne' is showing, instead I only get the last value.

VF page:
 <apex:repeat value="{!fdquestionlist}" var="fd">
 <span>FeedBack Name=============></span>
<apex:outputLabel value="{!fd.Related_Feedback__r.Feedback_Name__c}" rendered="true"></apex:outputLabel>
<br />
<br />
                    <apex:outputField value="{!fd.Question__c}"/><br /><br />
          <br />   
          <br />
          <apex:selectRadio value="{!OptionOne}" id="SelectedRadio">
              <apex:selectOption itemValue="{!fd.Option_One__c}" itemLabel="{!fd.Option_One__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Two__c}" itemLabel="{!fd.Option_Two__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Three__c}" itemLabel="{!fd.Option_Three__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Four__c}" itemLabel="{!fd.Option_Four__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Five__c}" itemLabel="{!fd.Option_Five__c}"></apex:selectOption>
          </apex:selectRadio><br /><br />
   </apex:repeat>

Thanks,
Pritam
Hello all,

I have a object FeedbackMain__c which has a child Feedback_Question_Main__c, Feedback_Question_Main__c stores questions with options as individual records, I have displayed the question and answers in the form of radio buttons. And the third object is 'Question_Option__c' which is a child of Feedback_Question_Main__c which stores the result i.e. the value of the radio buttons. I am not able to store the multiple values in the Question_Option__c object under their respective parent question.

Following is my code:

VF Page : 


<apex:dataTable value="{!fdquestionlist}" var="fd" border="1">
          <apex:facet name="Caption">Table Caption</apex:facet>
          <apex:facet name="Header">Table Header</apex:facet>
          <apex:facet name="Footer">Table Footer</apex:facet>
          <apex:column value="{!fd.Question__c}"/>     
          <br />   
          <apex:column >
          <br />
          <apex:selectRadio value="{!OptionOne}" id="SelectedRadio" >
              <apex:selectOption itemValue="{!fd.Option_One__c}" itemLabel="{!fd.Option_One__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Two__c}" itemLabel="{!fd.Option_Two__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Three__c}" itemLabel="{!fd.Option_Three__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Four__c}" itemLabel="{!fd.Option_Four__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Five__c}" itemLabel="{!fd.Option_Five__c}"></apex:selectOption>
          </apex:selectRadio>
          </apex:column>
   </apex:dataTable>  


Apex Controller:
public PageReference doInsert() {
system.debug('OptionOne******************************'+OptionOne);
Question_Option__c qcans = new Question_Option__c();
lookupid=fdquestionobj.Related_Feedback__c;
qcans = [Select id,name,Question__c,Question__r.Related_Feedback__c,Response__c from Question_Option__c where Question__r.Related_Feedback__c=:lookupid];
qcans.Response__c = OptionOne;
system.debug('++++++++++++++++++++++++++++++++++++++++++++++++++++++'+OptionOne);
insert qcans;
}



Need Help.

Thanks.
Hello,

I have a child object "Website_Visit_Clickpath__c" and parent object "Lead_Inspector__c". I want to retrieve the count of child records using the parent through a trigger based on time, i.e. the records of the current month and records of the last month.

Below is the code I am using :

trigger WebsCount on Website_Visits_Clickpath__c (after insert,after update) {

    List<Lead_Inspector__c> leadInspector=new List<Lead_Inspector__c>();
    
    Website_Visits_Clickpath__c wCount;
    Lead_Inspector__c lIns;

    Integer mnth = System.Today().Month();
    
    system.debug('****Month******'+mnth);
    
    Integer Prevmnth = (System.Today().Month())-1;
    
    system.debug('****PrevMonth******'+Prevmnth); 
    
    Integer yr = System.Today().Year();
    
    
    Integer e=0;
    Integer p=0;
    List<id>LeadInspectorIds = new List<Id>();

    for(Website_Visits_Clickpath__c u:Trigger.New){
        if(u.id!=null){
        
           if(u.Lead_Inspector__c!=null)
            {
              LeadInspectorIds.add(u.Lead_Inspector__c) ;
              
            }  
            system.debug('*********Test*********'+LeadInspectorIds);
            wCount= [SELECT Id,Lead_Inspector__c FROM Website_Visits_Clickpath__c WHERE Id=:Trigger.New];
            lIns=[SELECT Id,Total_Website_Visitors_CM__c,Total_Website_Visitors_LM__c,WebVisitorDiff__c, Total_Lead_Identified__c FROM Lead_Inspector__c WHERE Id=:wCount.Lead_Inspector__c];
             
            system.debug('+++++++++++++wCount+++++++++'+wCount); 
            system.debug('+++++++++++++lIns+++++++++'+lIns); 
                                
            e = [select count() from Website_Visits_Clickpath__c where Lead_Inspector__c =:wCount.Lead_Inspector__c  AND  CALENDAR_MONTH(Date_Time__c) = :mnth AND CALENDAR_YEAR(Date_Time__c) = :yr];
            
            p = [select count() from Website_Visits_Clickpath__c where Lead_Inspector__c =:wCount.Lead_Inspector__c  AND  CALENDAR_MONTH(Date_Time__c) = :Prevmnth AND CALENDAR_YEAR(Date_Time__c) = :yr];
            
           
               
            lIns.Total_Website_Visitors_CM__c=e;
            
            lIns.Total_Website_Visitors_LM__c=p;
            
            lIns.WebVisitorDiff__c=e-p;
            
            system.debug('+++++++++++++lIns.WebVisitorDiff__c+++++++++'+lIns.WebVisitorDiff__c);
            
            leadInspector.add(lIns);
            
 
        }
        
            update leadInspector;
        
     }

}


Thanks.

Hello,

I have used the following link to setup Open CTI for my ORG. 
  https://developer.salesforce.com/docs/atlas.en-us.workbook_service_cloud.meta/workbook_service_cloud/service4_step1.htm

I have got everything done, but when I click on any number only an alert appears displaying the JSON response of the clicked number and nothing happens after that. Am I missing something ?


Thanks.

Hello,
     I have created a Visualforce page which is using a custom object as a standard controller and has 2 fields which are lookup to another custom object. I have checked the Security Settings all fields are kept visible for the Profile of community users. But when I use the page through the partner community these two fields are not visible.

VF Code:
<apex:inputField styleClass="inputfield" value="{!Class__c.Coach__c}" />
<apex:inputField styleClass="inputfield" value="{!Class__c.Assistant_Coach__c}" />

Thanks.
Hello,
     I am trying to write an after insert trigger to change the OwnerId of a record in a custom object. But when I try and create a new record the following error occurs :
Apex trigger OwnerSwap caused an unexpected exception, contact your administrator: OwnerSwap: execution of AfterInsert caused by: System.FinalException: Record is read-only: Trigger.OwnerSwap: line 6, column 1

Following is the trigger I have written :
trigger OwnerSwap on Course__c (after insert) {
    for(Course__c c : Trigger.New)
        {
           if(c.OwnerId != null)
           {
               c.OwnerId = c.Health_Coach__c;
           }
        }
}

Thanks.
I have a Custom object and a Record type for Contact into which I have to insert data through JitterBit Cloud Data Loader. The custom object and Contact is related using a Master-Detail relationship. I want to insert data into both the destinations. How can this be done?

Thanks.
Hello,

      I have a VisualForce page in which I am showing the data in table using apex:outputtext inside apex:column. How do I enable InlineEdit for it
     
      Following is a sample code:
      <apex:column headerValue="Participant Name">  
           <apex:outputText value="{!c.Participant_Name__c}"/>    
      </apex:column>

Thanks.
Hello,

I am using the following approach to auto-populate the fields:

      http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html

The normal text fields and date fields are getting auto-populated but the lookup fields remain blank. I get the value of the field in the URL but it does not appear.

Thanks.
Hello,

I am trying to pass selected picklist value to apex class dynamically using actionsupport, but when I check using debug logs I am getting the value as null. I need this value as I have to get data from query to populate another custom picklist.

Below is my code:
VISUALFORCE PAGE:
//FIRST PICKLIST
<apex:selectList size="1" id="ApplicationDrop" value="{!ApplicationVar}"  >
            <apex:actionSupport event="onchange" reRender="FBiasR" status="rend"/>
            <apex:selectOptions value="{!ApplicationOptions}"></apex:selectOptions>
  </apex:selectList>

//SECOND PICKLIST
<apex:selectList size="1" id="FBiasR" value="{!FBiasRVar}">
             <apex:selectOptions value="{!FBRItems}"></apex:selectOptions>
</apex:selectList>

APEX CLASS:
 public  List<SelectOption> getFBRItems() {
         system.debug('APPLICATION ------------->'+ApplicationVar);
         List<SelectOption> options = new List<SelectOption>();
         options.add(new SelectOption('None','None'));
         
         for(AggregateResult ar : [Select Recommendation__c from Fleet_Recommendation__c where Axle__c = 'Front' AND Tyre_Class__c = 'Bias' AND Application__c =:ApplicationVar GROUP BY Recommendation__c])
         {
         options.add(new SelectOption(String.valueOf(ar.get('Recommendation__c')),String.valueOf(ar.get('Recommendation__c'))));
         }
          return options;
   }


I have done this same functionality on another VF page there it is working correctly with the same code. Need Help!
Hello,

I am displaying questions on a VF page and their options in form of radio buttons, but when I try to get the selected values of all the radio buttons and insert them for each record, blank value is passed.
Following is my code :
VF PAGE :
<apex:page controller="DisplayController" sidebar="false">
  <apex:form >
        <apex:repeat value="{!Questions}" var="q">
          <apex:outputField value="{!q.Related_Question__r.Question__c}"/>
          <apex:selectRadio value="{!q.Related_Question__r.Selected_Value__c}" id="RadioButtonValue" >
             <apex:selectOptions value="{!Options}" ></apex:selectOptions>
          </apex:selectRadio><br /><br />
       </apex:repeat>  
     <apex:commandButton action="{!SubmitSurvey}" value="Save" title="Save"/>
  </apex:form>
 </apex:page>


APEX CONTROLLER :
public with sharing class DisplayController {

    Public Survey_Main__c mainobj{get;set;}
    Public Survey_Question_Table__c questobj{get;set;}
    Public Survey_Option_table__c optobje{get;set;}
    Public List<Survey_Main__c> mainList{get;set;}
    Public List<Survey_Question_Table__c> questList{get;set;}
    Public List<Survey_Option_Table__c> optList{get;set;}

    Public String SelectedValue{get;set;}

    Public DisplayController(){
        
    }

   Public List<Survey_Option_Table__c> getQuestions(){
    
        optList = [select id, name,Option_One__c,Option_Two__c,Option_Three__c,Option_Four__c,Option_Five__c,Answer__c, Related_Question__r.Question__c,Related_Question__r.Selected_Value__c,Related_Question__r.Related_Survey__c from Survey_Option_Table__c where Related_Question__r.Related_Survey__c = 'a0d28000001GVcw'];
        
        return optList;
    }


    Public List<SelectOption> getOptions(){
        questList = [select id, name, Question__c,Selected_Value__c,Related_Survey__c from Survey_Question_Table__c where Related_Survey__c = 'a0d28000001GVcw'];
        optList=[select id, name, Option_One__c,Option_Two__c,Option_Three__c,Option_Four__c,Option_Five__c,Answer__c, Related_Question__c from Survey_Option_Table__c where Related_Question__c =: questList];
        
        List<SelectOption> options = new List<SelectOption>();
          for(integer i=0;i<1;i++)
                 {
                 system.debug('++++++++++++++OPTION BLOCK+++++++++++++++'+optList[i]);
                 options.add(new SelectOption('Option One','Option One'));
                 options.add(new SelectOption('Option Two','Option Two'));
                 options.add(new SelectOption('Option Three','Option Three'));
                 options.add(new SelectOption('Option Four','Option Four'));
                 options.add(new SelectOption('Option Five','Option Five'));
                 }
          return options;
    }
   
   
   public PageReference SubmitSurvey() {
    
    for (Survey_Option_Table__c sqItem : getQuestions()) {
 if(sqItem.Related_Question__r.Selected_Value__c != null || sqItem.Related_Question__r.Selected_Value__c != ' '){
     
               //Inserting The Survey Result
               Survey_Result__c SurveyResult = new Survey_Result__c(
                      Answer__c = sqItem.Related_Question__r.Selected_Value__c,
                      Related_Question__c = sqItem.Related_Question__r.Id
                     );
               insert SurveyResult;
        }  else{

             ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please Select Atleast one value'));  
        }

    }
        return null;
}


Need help on this...Urgent !

Thanks.
Hello all,

I want to get different values of <apex:selectRadio> which is in <apex:repeat>. How do I acheive this?

In debug logs I can see the following :-
06:36:53.0 (30801063)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this.OptionOne|"One"|0x54e51697
06:36:53.0 (30901056)|SYSTEM_MODE_ENTER|true
06:36:53.0 (30931204)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
06:36:53.0 (30935083)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
06:36:53.0 (30944764)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this.OptionOne|"Four"|0x54e51697
06:36:53.0 (31041462)|SYSTEM_MODE_ENTER|true
06:36:53.0 (31075557)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:5
06:36:53.0 (31079500)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
06:36:53.0 (31088629)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this.OptionOne|"Three"|0x54e51697

'OptionOne' is the value passed from <apex:selectRadio>, and I want all the values that 'this.OptionOne' is showing, instead I only get the last value.

VF page:
 <apex:repeat value="{!fdquestionlist}" var="fd">
 <span>FeedBack Name=============></span>
<apex:outputLabel value="{!fd.Related_Feedback__r.Feedback_Name__c}" rendered="true"></apex:outputLabel>
<br />
<br />
                    <apex:outputField value="{!fd.Question__c}"/><br /><br />
          <br />   
          <br />
          <apex:selectRadio value="{!OptionOne}" id="SelectedRadio">
              <apex:selectOption itemValue="{!fd.Option_One__c}" itemLabel="{!fd.Option_One__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Two__c}" itemLabel="{!fd.Option_Two__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Three__c}" itemLabel="{!fd.Option_Three__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Four__c}" itemLabel="{!fd.Option_Four__c}"></apex:selectOption>
              <apex:selectOption itemValue="{!fd.Option_Five__c}" itemLabel="{!fd.Option_Five__c}"></apex:selectOption>
          </apex:selectRadio><br /><br />
   </apex:repeat>

Thanks,
Pritam
Hello,
     I am trying to write an after insert trigger to change the OwnerId of a record in a custom object. But when I try and create a new record the following error occurs :
Apex trigger OwnerSwap caused an unexpected exception, contact your administrator: OwnerSwap: execution of AfterInsert caused by: System.FinalException: Record is read-only: Trigger.OwnerSwap: line 6, column 1

Following is the trigger I have written :
trigger OwnerSwap on Course__c (after insert) {
    for(Course__c c : Trigger.New)
        {
           if(c.OwnerId != null)
           {
               c.OwnerId = c.Health_Coach__c;
           }
        }
}

Thanks.
Hello,

      I have a VisualForce page in which I am showing the data in table using apex:outputtext inside apex:column. How do I enable InlineEdit for it
     
      Following is a sample code:
      <apex:column headerValue="Participant Name">  
           <apex:outputText value="{!c.Participant_Name__c}"/>    
      </apex:column>

Thanks.
Hello,

I am using the following approach to auto-populate the fields:

      http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html

The normal text fields and date fields are getting auto-populated but the lookup fields remain blank. I get the value of the field in the URL but it does not appear.

Thanks.
Hi ,
 
I am trying to change the contact owner of the contact on insert and I am directed to the page saying insufficient permission.
The profile has a limites access on contact that is only read edit and create. Change the Owner option is available in the UI but unable to control on the edit page
 
Here is the code
 
trigger UpdateCOwner on Contact (before insert, after insert)
{
//Query for the ARS Account Leader of the contact's Account 
//Set the contact ARS Owner value to Leader value obtained 
//Insert Record 
Contact c = new Contact();
Map<String, Contact> contactMap = new Map<String, Contact>();
for (Contact contact : System.Trigger.old) 
{
if(Trigger.isBefore)
{

if (System.Trigger.isInsert)
{
string profileName = [select profile.name from user where id = :contact.OwnerId][0].profile.name;
if(profileName.indexOf('Call Center')>-1)
{
Account acnt = [select ARSaccountleader_lookup__c,ACWaccountleader_lookup__c from Account where Id=:contact.AccountId];
string acntLeader = [select ARSaccountleader_lookup__c from Account where Id=:contact.AccountId][0].ARSaccountleader_lookup__c;
//string acntLeader = [select ARSaccountleader_lookup__c from Account where Id=:contact.AccountId][0].ARSaccountleader_lookup__c;
//string test = acnt.ACWaccountleader_lookup__c;
contact.Created_by_Call_Center__c = true;
if(acnt.ARSaccountleader_lookup__c != null)
{
contact.OwnerId = acnt.ARSaccountleader_lookup__c;
}
else if (acnt.ACWaccountleader_lookup__c != null)
{
contact.OwnerId = acnt.ACWaccountleader_lookup__c;
}
contactMap.put(contact.OwnerId,contact);
//c = contact;

}
else contactMap.put(contact.Id,contact);
}
}

}
}
 
Can some one help with finding how this can be handled.A use with limited profile cannot create a contact with the differnt owner and this causing the problem.
Is there a way we can update the record after insert
 
Thanks in advance.
 
Thanks & Regards,
Suchitra


Message Edited by Suchitra on 03-07-2008 08:34 AM