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
AnidevAnidev 

Custom Controllers

Hi All,

This is with a basic doubt that i have:

// e.g. of custom controller as available on salesforce //

<apex:page controller="NewAndExistingController" tabstyle="Account">
    <apex:form>
        <apex:pageBlock mode="edit">
            <apex:pageMessages/>
            <apex:pageBlockSection>
                <apex:inputField value="{!Account.name}"/>
                <apex:inputField value="{!Account.phone}"/>
                <apex:inputField value="{!Account.industry}"/>
            </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>


Now how do i get a page with above on say "opportunity" or "account" object as a "detail" page.

Kindly advice.

Many thanks in advance.

Regards,
Anidev
 
Techman97Techman97
If you're asking how to show the standard page layout for an object on your page, you can use the <apex:detail> element to display this information.  You just need to pass it an ID to render.
AnidevAnidev
Hi Techman,

Sincerest apologies for the inordinate, inexcessive, inexcusable delay in acknowledging your answer.
Kindly pardon.
Many Many thanks for your immediate response.
However, my question was, how do we get the above page, say under a "button" created in "Account" or "Opportunity" object.
Hope this gives a better understanding of my quandry.

As always, thanks again in advance

Regards,
Anidev