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
phani_mphani_m 

How can i link the standard object to visual force?

Hai...............

                              I created a job object in standard platform we can get jobs tab by clicking on that we get the records stored on that object , now how can i get that all records displaying whole page on to the vf page 

In develpers guide we have only how to access the records of that job(object) but not to get the existing whole list of jobs  page.......

            
Can any one help

harsha__charsha__c

Hey,

 

This can be achieved by using "standard controller" and "recordsetvar" in the vf page

 

An example can be seen below

 

<apex:page standardController="Account" recordSetVar="accounts" tabstyle="account" sidebar="false">
	<apex:pageBlock >
		<apex:pageBlockTable value="{!accounts}" var="a">
			<apex:column value="{!a.name}"/>
		</apex:pageBlockTable>
	</apex:pageBlock>
</apex:page>

 This example is given in the pdf (http://www.salesforce.com/us/developer/docs/pages/salesforce_pages_developers_guide.pdf)

PremanathPremanath

The Above code will work but only when you pass Any one of Account record id in url.

 

<apex:page standardController="account"  tabStyle="account" recordSetVar="accounts" sidebar="false">
<apex:pageBlock >
<apex:pageblockTable value="{!accounts}" var="a" >
<apex:column value="{!a.name}"/>
<apex:column value="{!a.AccountNumber}"/>
<apex:column value="{!a.NumberOfEmployees}"/>
<apex:column value="{!a.Rating}"/>
</apex:pageblockTable>
</apex:pageBlock>
 
</apex:page>

 

https://c.ap1.visual.force.com/apex/test2?id=0019000000A9xNM

 

That id should be your account record id

 

 

 

 

Prem

harsha__charsha__c

Hi Prem

 

Good thing you raised. You are right in case if the Account Id is passed to the page.

 

But the case here is that we dont need to pass any Account Id here.

 

Just run page as: https://c.ap1.visual.force.com/apex/standardListController  ( no url parameters ).

 

I hope you are clear now.

 

However thanks for raising this case.

PremanathPremanath

Hi Harsha,

 

It's not giving any records without pasing id. It's giving empty page.

Are you aware of this.?

 

 This is your code Right!

 

<apex:page standardController="Account" recordSetVar="accounts" tabstyle="account" sidebar="false">
	<apex:pageBlock >
		<apex:pageBlockTable value="{!accounts}" var="a">
			<apex:column value="{!a.name}"/>
		</apex:pageBlockTable>
	</apex:pageBlock>
</apex:page>

harsha__charsha__c

Yes, This is the code.

 

But I implemented this in my dev org and it giving me the account records though I dint pass any account Id through url.

 

Plz check once again and let me know