You need to sign in to do that
Don't have an account?
onclick get related data
Hi All,
Below is Vf code.The issue is when i click on any name i should get its related data.
Example :IF name is Deepak if i click on deepak i should get its related data like its related account name and all.
Thanks,
Deepak
Below is Vf code.The issue is when i click on any name i should get its related data.
Example :IF name is Deepak if i click on deepak i should get its related data like its related account name and all.
Thanks,
Deepak
<apex:page controller="conrec1" sidebar="false" showHeader="false"> <apex:pageBlock title="Search for the contact"> <apex:form > <apex:inputText value="{!data}"/> <apex:commandButton value="Search"/> <apex:pageBlockTable title="Contact" var="f" value="{!data1}" columns="3"> <apex:column value="{!f.name}" headerValue="Name"/> <apex:column headerValue="Email" value="{!f.Email}"/> <apex:column headerValue="Phone" value="{!f.phone}"/> </apex:pageBlockTable> </apex:form> </apex:pageBlock> </apex:page>
public class conrec1 { public list<contact> l; public string data{get;set;} public list<contact> getdata1(){ l= [select name,email,phone from contact where name like: data + '%']; system.debug(l); return l; } }
The Visualforce page:
The controller code:
All Answers
The Visualforce page:
The controller code: