+ Start a Discussion
avimeiravimeir 

Embed VF page into custom object detail page

Hi all,

 

I have the following VF page:

 

<apex:page controller="CheckAvailController">

<apex:sectionHeader title="Check Availabilities"/>
<apex:pageblock >
    <apex:form >
        <apex:outputLabel value="From: " for="fromDate"/><apex:inputField id="fromDate" value="{!availFrom.Date__c}" />
        <apex:outputLabel value="To: " for="toDate"/><apex:inputField id="toDate" value="{!availTo.Date__c}" />
        <apex:commandButton action="{!search}" value="Search" />
    </apex:form>
    <apex:pageBlock >
        <apex:pageBlockTable value="{!availabilities}" var="avail">
            <apex:column value="{!avail}" />
        </apex:pageBlockTable>
    </apex:pageBlock>

</apex:pageblock>

</apex:page>

 

And I want to embed this into the details page of the custom Reservation__c object, can't seem to find a way to do it. I tried changing the apex:page tag into:

<apex:page controller="Reservation__c" extensions="CheckAvailController">

 But it doesn't accept Reservation__c as controller.

 

What am I missing?

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

You need to use the standard controller to be able to embed into a record view page.  Your page element needs to be:

 

<apex:page standardController="Reservation__c" ...

 

All Answers

bob_buzzardbob_buzzard

You need to use the standard controller to be able to embed into a record view page.  Your page element needs to be:

 

<apex:page standardController="Reservation__c" ...

 

This was selected as the best answer
avimeiravimeir

Thanks!