• Paresh Koshti
  • NEWBIE
  • 5 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
I need to get the foreign key columns of a table . In the describeObjectResult for the table,I get a list of child relationships but not the fk columns in this table to which the child column is mapped.
Using a Standard List Controller, create a Visualforce page which displays a list of Accounts with links to their respective record detail pages.The page must be named 'AccountList'.
It must reference the Account standard controller.
It must have a recordSetVar equal to 'accounts'.
It must have a Visualforce apex:repeat component.
The repeater must have the var attribute set to 'a'.
The repeater must use the <li> HTML list tag
The repeater must use the apex:outputLink component to link to the respective record detail page
HINT: Record detail pages can be reached by placing a record ID at the root of the URL (e.g. '/<record id>')

I tried this code i am able to retrieve the records and clicking on each record showing  the detail page of that record.But Still Trail Head is showing error.Can someone guide me if  I am wrong


<apex:page standardController="Account" recordSetVar="accounts">
    <apex:pageBlock title="Accounts">
      <apex:repeat value="{!Accounts}" var="a">
      <li>
       <apex:outputLink value="{!URLFOR($Action.Account.view, a.id)}">{!a.Name}
       </apex:outputLink>
     </li>
   </apex:repeat>
   </apex:pageBlock> 
</apex:page>
 
Hi All,

I have two custom objects like Student__c(Detail) and Batch__c(Master). I had created lookup field for Batch__c on Student__c and added some records. But now i want to change lookup field as master detail.

For that i have populated the lookup field with data in all records of Student__c and trying to change the relationship type to Master-Details.
but still getting same error like " You cannot create a new Master-Detail relationship on an existing custom object if records already exist. You must first create a Lookup relationship, populate the lookup field with data in all records, and then change the relationship type to Master-Detail. "

Please post the appropriate answer..

Thank you.
Nani.

 

How many ways we can do  mandatary the field ? can any one say plz ....thanks in advance