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
P00j@P00j@ 

please help

I have a object called partname which is a lookup on other object called stock ,how to display partname records using visual force?
Best Answer chosen by P00j@
Krishna SambarajuKrishna Sambaraju
Your question is not clear. Do you need to display the list of partname records in a Visualforce page? Here is an example of controller and visualforce page.
Controller:
public class PartnameListController{
	public List<Partname__c> partnames {get; set;}
	public PartnameListController()
	{
		partnames = [select Id, Name from Partname__c LIMIT 10];
	}
}
Visualforce Page:
<apex:page controller="PartnameListController">
	<apex:pageBlock>
		<apex:pageBlockTable value="partnames" var="pn">
			<apex:column headerValue="Part Name" value="{!pn.Name}"/>
		</apex:pageBlockTable>
	</apex:pageBlock>
</apex:page>
You can amend the fields and LIMIT accordingly.

Hope this helps.
 

All Answers

Krishna SambarajuKrishna Sambaraju
Your question is not clear. Do you need to display the list of partname records in a Visualforce page? Here is an example of controller and visualforce page.
Controller:
public class PartnameListController{
	public List<Partname__c> partnames {get; set;}
	public PartnameListController()
	{
		partnames = [select Id, Name from Partname__c LIMIT 10];
	}
}
Visualforce Page:
<apex:page controller="PartnameListController">
	<apex:pageBlock>
		<apex:pageBlockTable value="partnames" var="pn">
			<apex:column headerValue="Part Name" value="{!pn.Name}"/>
		</apex:pageBlockTable>
	</apex:pageBlock>
</apex:page>
You can amend the fields and LIMIT accordingly.

Hope this helps.
 
This was selected as the best answer
P00j@P00j@

Sorry,my question wasnt clear but you approached it exactly .

Thank you