You need to sign in to do that
Don't have an account?
Chitral Chadda
how to hide related list
<apex:page standardController="Contact" >
<apex:detail relatedList="false">
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlockSection >
<apex:inputField value="{! contact.accountid}"/>
<apex:inputField value="{! contact.phone}"/>
<apex:inputField value="{! contact.FirstName}"/>
<apex:inputField value="{! contact.LastName}"/>
<apex:inputField value="{! contact.Fax}"/>
<apex:inputField value="{! contact.Email}"/>
<apex:inputField value="{! contact.title}"/>
<apex:inputField value="{! contact.phone}"/>
<apex:inputField value="{! contact.HomePhone}"/>
<apex:inputField value="{! contact.Department}"/>
<apex:inputField value="{! contact.Birthdate}"/>
<apex:inputField value="{! contact.MobilePhone}"/>
<apex:commandButton action="{! save }" value="save"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
when i save the contact it shows related list like cases, opportunity etcc..
i dont want the related list to come i hv put the tag for it but its still showing related list
<apex:detail relatedList="false">
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlockSection >
<apex:inputField value="{! contact.accountid}"/>
<apex:inputField value="{! contact.phone}"/>
<apex:inputField value="{! contact.FirstName}"/>
<apex:inputField value="{! contact.LastName}"/>
<apex:inputField value="{! contact.Fax}"/>
<apex:inputField value="{! contact.Email}"/>
<apex:inputField value="{! contact.title}"/>
<apex:inputField value="{! contact.phone}"/>
<apex:inputField value="{! contact.HomePhone}"/>
<apex:inputField value="{! contact.Department}"/>
<apex:inputField value="{! contact.Birthdate}"/>
<apex:inputField value="{! contact.MobilePhone}"/>
<apex:commandButton action="{! save }" value="save"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
when i save the contact it shows related list like cases, opportunity etcc..
i dont want the related list to come i hv put the tag for it but its still showing related list
Your Code Shows that you are in New or Edit page, where Related lists are visible only on Detail page
Use below Code and Override View Button
<apex:page standardController="Contact">
<apex:detail subject="{!Contact.Id}" relatedList="false" title="false"/>
</apex:page>
If this post is helpful please throw Kudos.
If this post solves your problem kindly mark it as solution.
Both above answers are right.
you are using the standard Save action so after clicking on it it'll jump on the standard detail page and their all related list are true.
so have to use Quicksave action because this action stay on this page.
and use the code which BLearn write above >
i.e