• Force.com Developer.ax1566
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies

I have a master table say employee and a chile table called employee_subordinates

 

So it is 1 to n relationship b/w them.

I am looking at cloning function which will help me to clone both the master and child tables when i click on clone. Any example code for this clone function is very helpful. Thanks in advance

MPM

Hi All,

 

I have a force.com site and I am trying to display a search criteria on the site.

 

Basically, The query does return the results, but I am unable to view it on the site. I am able to display all the custom object details correctly, but I am unable to display any details pertaining to a USER.

 

Senario,

I have logged in as a registered user to my site. I have created a new profile and given all the required permissions to the custom object , so that the fields are visible when i search on particular senario.

 

My search query is as below:

 

 public pagereference Search() {
        userVehicleDtlsLst = new List<Vehicle_Details__c>();
        userVehicleDtlsLst = [Select
                            v.User_Name__r.Phone, v.User_Name__r.Email, v.User_Name__r.FirstName,
                            v.User_Name__r.LastName, v.User_Name__r.Username,  v.Seats_Available__c,

                            From Vehicle_Details__c v
                            where v.Origination__c =: Origination and v.Destination__c =: Destination];
        system.debug('++++++UserValue'+userVehicleDtlsLst);                    
        return null;    
    }

 

VF page:

<apex:pageBlock id="pageBlk">
    <apex:pageBlockSection >
        <apex:pageBlockTable value="{!userVehicleDtlsLst}" var="userDetails" rendered="{!NOT(ISNULL(userVehicleDtlsLst))}" columns="7">
        <apex:column value="{!userDetails.User_Name__r}"/>
        <apex:column value="{!userDetails.User_Name__r.Email}"/>
        <apex:column value="{!userDetails.User_Name__r.Phone}"/>
        <apex:column value="{!userDetails.Seats_Available__c}"/>
        </apex:pageBlockTable>
    </apex:pageBlockSection>
    </apex:pageBlock>

 

Please let me know how i can display the User object details. All the code has been complied successfully.

 

Thanks