You need to sign in to do that
Don't have an account?
Sravanthi Sunkari
how to make a field visible only on edit page but not on detail page
Hi, Can anyone suggest me how to make a custom field(Data Type Number) on Account object editable on creat/edit page but hidden on detail page once record is saved.
From previous question & answers I understand that it is possible only through VF page to override the settings. Can someone explain how this can be done eithr standerd if possible otherwise if not through VF page in detail. ( I am new to programming, a sample of code will be appreciated)
From previous question & answers I understand that it is possible only through VF page to override the settings. Can someone explain how this can be done eithr standerd if possible otherwise if not through VF page in detail. ( I am new to programming, a sample of code will be appreciated)
In order to hide any field only from detail page of Account you have to create a custom VF page on Account and override the view button of Account with this VF page.
I am providind you a sample code of VF page :
The fields which you will add in the pageBlockSection will. be visible on the Account detail page.
So you can customize this page according to your requirement and do not add the field which you want to hide.
Please let me know if you need more help on this.
Regards,
Abhishek
All Answers
In order to hide any field only from detail page of Account you have to create a custom VF page on Account and override the view button of Account with this VF page.
I am providind you a sample code of VF page :
The fields which you will add in the pageBlockSection will. be visible on the Account detail page.
So you can customize this page according to your requirement and do not add the field which you want to hide.
Please let me know if you need more help on this.
Regards,
Abhishek
Overriding Standard Buttons and Tab Home Pages
https://help.salesforce.com/HTViewHelpDoc?id=links_customize_override.htm
https://help.salesforce.com/HTViewHelpDoc?id=links_override_considerations.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=links_override_considerations.htm&language=en_US)
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_tabs.htm
You can see below vedio for step by step process
https://www.youtube.com/watch?v=kiCbsoOF6so
Override standard Links with VisualForce pages in Salesforce
http://www.jitendrazaa.com/blog/salesforce/override-standard-links-with-visualforce-pages-in-salesforce/
Pleae let us know if this will help you
Thanks
Amit Chaudhary
Thanks for your replies and help.
Both of your answers helped me to solve my problem. I might have not been able to do it without one another.
As I had to choose only one best answer, I had to choose the first one(Abhishek's) which gave me detailed understanding of the code.
I alterd the code little bit as the above code resulted in some minor errors.
<apex:page standardController="Account">
<apex:sectionHeader title="Account Detail"/>
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton action="{!edit}" value="Edit"/>
<apex:commandButton action="{!delete}" value="Delete"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="2" title="Account Information">
<apex:outputField value="{!Account.Name}" />
<apex:outputField value="{!Account.AccountNumber}"/>
<apex:outputField value="{!Account.Fax}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
This is my first code I had ever created on my own in salesforce to resolve the issue. Thanks to the community for giving me a chance to learn something new today without much hassels to face.
I received the fallowing error when I tried to add a Hirarchy field Parent Account
Expression value does not resolve to a field
Error is in expression '{!Account.Parent}' in component <apex:outputField> in page
thanks
I am working on Sales user profile pagelayout currently . Does overriding with VF page effect the detail pages of other profiles or the record types of same profile.
Thanks.
Answering your first question : Please use the API name of Parent field. I think you have custom field on Account object as Parent so please use its API name like Parent__c.
Secomd Question : If you override a standard detail page than it will effect all the page layouts and record types also.
Thanks,
Abhishek.