• vinayk kumar
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi,anybody knows How to integrate Gsuite from salesforce without using restapi,soapapi? ,
(want to move data (emails) to salesforce as case).....plz tell me.
want insert selected radio option from vf page
<apex:page controller="OnlineFeed" id="testpage">
    <apex:form id="theform" >
        <apex:pageBlock title="OnlineFeedback" id="pb">
            <apex:pageBlockSection columns="1" title="RegistrationForm" collapsible="false" >
                <apex:pageBlockSectionItem id="pbsi1">
                    <apex:outputLabel >Name:</apex:outputLabel>
                    <apex:inputText value="{!TName}" />
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem id="pbsi2">
                    <apex:outputLabel >Email:</apex:outputLabel>
                    <apex:inputText value="{!TEmail}" />
                    
                </apex:pageBlockSectionItem> 
            </apex:pageBlockSection>
            <apex:outputLabel >How satisfied were you with:</apex:outputLabel><br/>
            <h1>Key point #1</h1><br/>
            
            
            <input class="radioBtn" type="radio" name="order" onchange="getSelectedValue()" value="Very Satisfied"/>Very Satisfied
            <input class="radioBtn" type="radio" name="order" onchange="getSelectedValue()" value="Satisfied" />Satisfied
            <input class="radioBtn" type="radio" name="order" onchange="getSelectedValue()" value="Neutral" />Neutral
            <input class="radioBtn" type="radio" name="order" onchange="getSelectedValue()" value="Unsatisfied" />Unsatisfied
            <input class="radioBtn" type="radio" name="order" onchange="getSelectedValue()" value="veryUnsatisfied" />veryUnsatisfied<br/>
            
            <apex:outputLabel >Feel free to add any other comments or suggestions:</apex:outputLabel><br/>
            <apex:inputTextarea cols="30" rows="10"/><br/>
            <apex:outputText >* The information given within the Feedback Form will be used for service improvement only and are strictly confidential.</apex:outputText>
            
            
            
            <apex:commandButton title="save" onclick="getSelectedValue();" action="{!submitted}" value="save" >
              
                
            </apex:commandButton>
        
        </apex:pageBlock>
     
        
    </apex:form>
    <script>
    
    function getSelectedValue() {
        var radioBtns = document.getElementsByClassName("radioBtn");
        for(var i = 0; i < radioBtns.length; i++){
            if(radioBtns[i].checked)   
            {
                alert( 'button checked :'+radioBtns[i].value);
                document.getElementById("key1").value =radioBtns[i].value; 
                
                alert( 'button checked :'+radioBtns[i].value);
                document.getElementById("key2").value=radioBtns[i].value;
                alert( 'button checked :'+radioBtns[i].value);
                document.getElementById("key3").value=radioBtns[i].value;
                alert('button checked:'+radioBtns[i].value);
                document.getElementById("key4").value=radioBtns[i].value;
                alert('button checked:'+radioBtns[i].value);
                document.getElementById("key5").value=radioBtns[i].value;
                alert('button checked:'+radioBtns[i].value);
                var key1=radiBtns[i].value;
                return false ;
            }
            
                
        }
    }
        </script>
</apex:page>






public class OnlineFeed {
    public string TName{set;get;}
    public string TEmail{set;get;}
    public string  key1 {set;get;}
    //public string getSelectedValue{set;get;}
    public string key2{set;get;}
    public string key3{set;get;}
    public string key4{set;get;}
    public string key5{set;get;}
    
   public OnlineFeed(){
        
        TName='';
        TEmail='';
        key1= ''; 
        key2='';
        key3='';
        key4='';
        key5='';
        
    }
    
    public void submitted(){
        RegistrationForm__c r=new RegistrationForm__c();
        r.Name = TName;
        r.Email__c=TEmail;
        r.Key_point_1__c=key1;
        r.Key_point_2__c=key2;
        r.Key_point_3__c=key3;
        r.Key_point_4__c=key4;
        r.Key_point_5__c=key5;
        insert r;
        
        
    }
    

}
Hi,

I need to refresh the whole VF Page once my delete method executes. I have wriiten the below code. When I delete a particular record, the record is getting deleted but the page is not refreshing to show the updated records. Please help. 

VF Page:

<apex:page controller="viewdept_con" showHeader="false " id="mypage">
 <apex:form >
  <apex:pageBlock >
   <apex:pageblockTable value="{!deptlist}" var="item"> 
     <apex:column headerValue="Action">
     <apex:commandLink value="Detail" action="{!deptdetail}"/><b> | </b>
     <apex:commandLink value="Del" action="{!deptdelete}" reRender="mypage">
     <apex:param name="deptid" value="{!item.id}" assignTo="{!deptid}"/>
     </apex:commandlink>
     </apex:column>
     <apex:column value="{!item.name}"/>
   </apex:pageblockTable>
  </apex:pageBlock>
 </apex:form>
</apex:page>

Controller:

public class viewdept_con {

   public list<department__c> deptlist { get; set; }
   public id deptid {get; set;}
   public department__c dept {get; set;}
   
   public viewdept_con()
   {
   deptlist = [select id, name from department__c];
   }
   
   public pagereference deptdetail()
   {
     pagereference pg = new pagereference('/apex/DepartmentDetail?deptid=' + deptid);
     return pg;
   }
   
   public pagereference deptdelete()
   {
     dept = [select id, name from department__c where id = :deptid];
     delete dept;
     return null;
   }
}

Thank you,
Satya

Hello everyone, 

Im new In this Environment and I had been stuck for several hours,,

my question is...

Is it possible to take my field Name(Text), From my object Account,, and display it on my Visual Force Page as a PickList or as a SearchPanel, where the user could easily choose a predefined Name from Account???