• Saleforce_new
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies

Hey all,

 

So I am using some command buttons to execute some page redirects via page references, but I was wondering how I could specify the target for the new window. I know that outputLink has the target attribute, but I would like to stick with the default Salesforce style on the buttons and not have to recreate it myself. Right now I have resorted to using javascript because I can specify "_parent", but does anyone know how to accomplish this with a PageReference?

 

Thanks!

Hi folks

Not sure if this is visualforce question or apex question in general. But I wanted to render a section of the page only when certain criteria are met. In this case, the criteria is when two fields in my object have specific value.

In my situation, I am using Case object and also using the case standard controller. And in my visualforce page, I want certain sections to be rendered if say:
field 1 contains any value - field 1 is a multi-picklist field
field 2 to contains a specific text value - field 2 is a text field.

I can get the render logic working when I am basing it off just one of the field:

for example:

<apex:form rendered="{!case.field1__c != null}">
this would work and the section would be rendered depending on if field1 (a multi-picklist field) contained any value.

Also,
<apex:form rendered="{!case.field2__c == 'specific text value'}">
this also work and the section would be rendered when field2 (a text field) contains the specific value.

However, I can't seem to get it working so that the section would be rendered only when both conditions are met.
I tried the following variations below but not seem to be working, can someone shed some light on this please?

<apex:form rendered="{ IF (AND(!case.field1__c != null,!case.field2__c=='specific text value'),true,false}">

<apex:form rendered="{ (!case.field1__c != null) && (!case.field2__c =='specific text value') }">


  • December 03, 2008
  • Like
  • 0