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
mdsmds 

basic ques: not getting the output for <apex:detail>

hey guyz... i dont knw y m facing this problem. when i first executed this code then i did see all the related list of opprtunity... but now  ... when i execute it   wat i see is just the block m creating in this code.... y it is happening ..

plz help!!!!!...

i knw it involves a silly mistake ....

 

 

<apex:page standardController="opportunity">

<apex:form >
<apex:pageBlock title="BLOCK"><apex:pageblockButtons ><apex:commandButton action="{!save}" value="save"/></apex:pageblockButtons><apex:pageBlockSection title="SECTION"><apex:inputField value="{!opportunity.name}"/>
<apex:inputField value="{!opportunity.type}"/>
</apex:pageBlockSection> </apex:pageBlock>

<apex:detail /> 

</apex:form> 

 

</apex:page>

Best Answer chosen by Admin (Salesforce Developers) 
aballardaballard

 

Are you specifiying an id parameter in the url?   apex:detail won't display anything unless you tell it what record to display,,,,,

All Answers

aballardaballard

 

Are you specifiying an id parameter in the url?   apex:detail won't display anything unless you tell it what record to display,,,,,

This was selected as the best answer
mdsmds

is there any other way instead of specifying the id parameter in url

aballardaballard

Most often, you end up invoking the page via a custom button from some other page, or an override for a standard action, and that supplies the id, so you don't expect users to type it in directly. 

 

But you can provide it on the apex:detail component  via the subject attribute.