You need to sign in to do that
Don't have an account?
CBiZcuit
Overriding standard button on Related List Section
We have a related list on the Account page layout for opportunities. We want to hide the standard button "new" based on an Account's field.
So it would be:
if (!Account.isAttest)
{//show the "new" button on related list for opportunity}
else
{//hide the "new" button}
How would we go about handling this?
After digging for awhile I solved this myself.
I created a New List Button (make sure it is a "List Button" type or you wont be able to add it to a page layout)
This calls a simple javascript function based on the {!Account.Attest__c}.
I added this New Button on the Account page layout, Opportunities Related List Section and unchecked Standard Button and voila!