• CBiZcuit
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 7
    Replies

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?

Basically I need to override a page layout and have to check if the Record Owner is logged in and GLB_Privacy_Opt_Out__c = true.

 

so I have right now

 

<apex:page action="{!if( !Account.GLB_Privacy_Opt_Out__c == true
    , null
    , urlFor($Action.Account.Tab, $ObjectType.Account, null, true))}"
    standardController="Account"
    recordSetVar="accounts"
    tabStyle="Account">
  <h1>GLB Opt Out Account</h1>

This page will only show the Account Name if you are not the owner and GLB_Opt_Out__c = 'true'
</apex:page>

Is there a way to check both values like

<apex:page action="{!if( !Account.GLB_Privacy_Opt_Out__c == true && &Profile.Name = !Account.OwnerID
    , null
    , urlFor($Action.Account.Tab, $ObjectType.Account, null, true))}"
    standardController="Account"
    recordSetVar="accounts"
    tabStyle="Account">
  <h1>GLB Opt Out Account</h1>
  This page will only show the Account Name if you are not the owner and GLB_Opt_Out__c = 'true'

</apex:page>

I keep getting syntax errors.

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?

Basically I need to override a page layout and have to check if the Record Owner is logged in and GLB_Privacy_Opt_Out__c = true.

 

so I have right now

 

<apex:page action="{!if( !Account.GLB_Privacy_Opt_Out__c == true
    , null
    , urlFor($Action.Account.Tab, $ObjectType.Account, null, true))}"
    standardController="Account"
    recordSetVar="accounts"
    tabStyle="Account">
  <h1>GLB Opt Out Account</h1>

This page will only show the Account Name if you are not the owner and GLB_Opt_Out__c = 'true'
</apex:page>

Is there a way to check both values like

<apex:page action="{!if( !Account.GLB_Privacy_Opt_Out__c == true && &Profile.Name = !Account.OwnerID
    , null
    , urlFor($Action.Account.Tab, $ObjectType.Account, null, true))}"
    standardController="Account"
    recordSetVar="accounts"
    tabStyle="Account">
  <h1>GLB Opt Out Account</h1>
  This page will only show the Account Name if you are not the owner and GLB_Opt_Out__c = 'true'

</apex:page>

I keep getting syntax errors.