function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aman wadhwa 18Aman wadhwa 18 

i want to create a vf page to show an opportunity record along with its opportunity line items can anyone help

ShirishaShirisha (Salesforce Developers) 
Hi Aman,

Greetings!

Please use the sample code provided below to create the VF page:
 
<apex:page standardcontroller="Opportunity">
<apex:pageblock title="Account">
<apex:outputlabel value="{!Opportunity.name}"></apex:outputlabel>
</apex:pageblock>
<apex:relatedlist list="OpportunityLineItem">
</apex:relatedlist>
</apex:page>

Reference:https://www.biswajeetsamal.com/blog/parent-record-related-list-in-visualforce-page/

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri​​​​​​​