How To Display Account Details With Similar Industry Records?

Salesforce Real Time Tasks:
             Some time we will get a requirement to Display the all the records in objects and whenever select one Record Then Display the Detail page of that Record and Show the Similar  Records with Same Industry Type.


Visualforce Page:
<apex:page controller="rtt5">
<apex:form >
    <apex:pageBlock >
        <apex:pageBlockButtons >
        <apex:commandButton value="Customer Direct Account" action="{!direct}"/>
        <apex:commandButton value="Customer - Channel Account" action="{!channel}"/>       
            <apex:pageblocktable value="{!acts}" var="row" >
            <apex:column >
            <apex:commandLink value="{!}" action="{!racts1}" rerender="abc">
                <apex:param value="{!}" name="aid"/>
                <apex:param value="{!}" name="aname"/>     
                 <apex:param value="{!row.industry}" name="aindustry"/>               
              <apex:column value="{!row.type}"/>
               <apex:column value="{!row.industry}"/>
           <apex:pageblocksection title="{!$CurrentPage.parameters.aname}" id="abc">
               <apex:detail subject="{!$CurrentPage.parameters.aid}"/>
                <apex:pageblocktable value="{!racts}" var="row"  >
              <apex:column value="{!row.Name}"/>
              <apex:column value="{!row.type}"/>             
               <apex:column value="{!row.industry}"/>

Apex Controller:
public class rtt5{

    List<Account> r_acts;
   // string  type;
    List<Account> acts =  [SELECT name,type,industry,phone,ownerid FROM Account ];           
    public List<Account> getacts(){
            return acts;
     public List<Account> getracts(){
            return r_acts ;
    public PageReference direct(){
        //type = 'Customer - Direct';
            acts =  [SELECT name,type,industry,phone,ownerid FROM Account WHERE Type ='Customer - Direct']; 
        return null;
    public PageReference channel(){
      // type = 'Customer - Channel';
             acts =  [SELECT name,type,industry,phone,ownerid FROM Account WHERE Type = 'Customer - Channel'];       
                return null;
    public pagereference racts1(){
    r_acts =[SELECT  name,type,industry,phone,ownerid FROM Account WHERE Industry =: ApexPages.CurrentPage().getParameters().get('aindustry') ];
    return null;





Apex Apex Default Methods Apex Methods Apex_Collections Apps Batch Apex Books CRM eBooks Data Import Wizard Data Management DataLoader Difference Between Error in Salesforce FAQ's FAQ's-Apex FAQ's-Apps FAQ's-CRM FAQ's-Data loader FAQ's-SOQL & SOSL FAQ'S-Triggers FAQ's-User Profile & Security FAQ's-VF Explorer Ide Formulas & Functions Integration Interview Questions Only Latest_Updates Limits&Best Practices Online-Training Reports and Dashboards Salesforce Deployment Salesforce Realtime Examples On Development Salesforce Realtime Task On Admin Salesforce Realtime Tasks Salesforce Realtime Tasks- Apex Salesforce Training Salesforce1 Mobile Sites SOQL Spring'14 Release Triggers User Profile & Security VF Tags VisualForce Winter'14 Release Wizard for Accounts/Contacts Workbench Workflows and Approvals
Sfdc Gurukul- All in one place for salesforce and step by step tutorial for beginners: How To Display Account Details With Similar Industry Records?
How To Display Account Details With Similar Industry Records?
How To Display Account Details With Similar Industry Records?,how to Display record information and it's details and industry,Display Account information with similar Industry,
Sfdc Gurukul- All in one place for salesforce and step by step tutorial for beginners
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy