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
ipsita19861.2880751705180098E1ipsita19861.2880751705180098E1 

Unable to fetch Field values of an object

Hi,

I m using a standard controller for my custom object

i want my object's field values to be displayed on visualforce page.

 

<apex:page showHeader="false" standardStylesheets="false" standardController="Project__c" recordSetVar="ProjectID">
<apex:form >
<apex:pageBlock title="Project Details ">
<apex:pageBlockSection>
<apex:inputField value="{!Project__c.Project_Description__c}"/>
<apex:inputField value="{!Project__c.Maintainance_Type__c}"/>
<apex:inputField value="{!Project__c.Registration_Date__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

here project description is a text field.

i want data of this field to be displayed on visualforce page in text box.

SatgurSatgur

Assuming name of this VF page is showProjectDetails.page, can you share what is the URL that you are providing in Browser to launch this VF?

 

Since you are using Standard controller, it will be required to pass ID of an existing record in order for <apex:inputField value="{!Project__c.Project_Description__c}"/> tag to show a value on the page.

 

- Satgur

ipsita19861.2880751705180098E1ipsita19861.2880751705180098E1

URL for page is https://c.ap1.visual.force.com/apex/ProjectDetail

as name of my page is ProjectDetail

which id u r talking abut to pass

ns where to pass

can u plz guide me

bob_buzzardbob_buzzard

In your page declaration, you have specified the recordSetVar attribute, which indicates to VF that you are using a standard list controller.  Looking at your page content, that doesn't appear to be the case.

 

Try changing your page declaration to:

 

<apex:page showHeader="false" standardStylesheets="false" standardController="Project__c">

 

This indicates to VF you are using a standard controller that is managing a single object instance named Project__c.

 

WRT the id, when you view an instance of Project__c, the URL will end with an id like: a00A0000001jOkx - this is the unique id of the record.  To use this record in your VF page, you'd use a URL like:

 

https://<salesforce instance>/apex/<page_name>?id=<record_id>

 

All of this is documented in detail in the Visualforce Developer's Guide.

FromCRMWonderlandFromCRMWonderland

If you want editable input text, then try .... <apex:inputTex>

ipsita19861.2880751705180098E1ipsita19861.2880751705180098E1

I m still unable to fetch any value frm the field of an object on the visualforce page in the page block using inputfield

value shuld **bleep** in the text box on that page which is already bieng saved previously.

bob_buzzardbob_buzzard

Have you changed your page declaration to remove the recordSetVar?

 

Can you post the URL that you use to access the page.

ipsita19861.2880751705180098E1ipsita19861.2880751705180098E1

i have changed the page declaration to remove recordstevar.

i dont want data of a particular record .as data keep on adding i want it to display data on page

https://c.ap1.visual.force.com/apex/ProjectDetail

Hani MHani M

Hi,

 

       Your use case is not clear, as per my understand I think you need to write one extension conroller or custome controller for ur requirement.

 

--Hani