Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I need to check two things and based on outcome display some text. The two things are that the lastModified date of an opportunity is before one date and after another

I try:

<apex:outputPanel rendered="{!IF((relatedTo.opportunity__r.LastModifiedDate <= NOW() - 30) && (relatedTo.opportunity___r.LastModifiedDate >= NOW() - 60, true, false))}">Stalled</apex:outputpanel>

I get:

Error: Syntax error. Missing ')'

But can't see where one is missing?

Any tips

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Try this one...

<apex:outputPanel rendered="{!IF((relatedTo.opportunity__r.LastModifiedDate <= NOW() - 30) && (relatedTo.opportunity___r.LastModifiedDate >= NOW() - 60), true, false)}">Stalled</apex:outputpanel>

It's not that one was missing per-se, its that it was in the wrong place (at the end).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.