+ Start a Discussion
dany__dany__ 

Hi i want to represent the account fields

i want to display this field  in my vf page how to achive this  plz guide me
<apex:page standardController="employee__c" extensions="ass">
  <apex:form >
  <apex:inputField value="{!acc.account__r.phone}"/>
  </apex:form>
</apex:page>
Bhanu MaheshBhanu Mahesh
Hi Dany,

If you are not using any other variable for employee__c, then you can represent account fields as following
<apex:inputField value="{!employee__c.account__r.phone}"/>

If you are using any variable in extension, lets take your variable for employee__c is emp, then
<apex:inputField value="{!emp.account__r.phone}"/>


Regards,
Bhanu Mahesh
 
dany__dany__
Hi can i pull the contact detail on the same page . if possible how can i 
Bhanu MaheshBhanu Mahesh
Hi Dany,
is Contact related to employee__c object.
If yes, then you can pull the contact data as Account.
If no, And you want to display the Contacts related to that Account in Controller 'ass', then you have to Query From Contacts Where AccountId = :emp.account__c
And then display that list on page using PageBlock table or repeat which ever feasible to you.

Regards,
Bhanu Mahesh
dany__dany__
Hi Bhanu Mahesh ,
I want to display the contact fields which is not having any relation ship with employee but (employee is child of account). i had written a query 
con= [select id, lastname,email,leadsource,department from contacts where accountid =: employee__c.account];
but this is not working....