You need to sign in to do that
Don't have an account?
Pablo Rivera 7
Single Code Error Syntax
Trying conditional formatting setting Apex Class. Used following code:
public class Hl{
<apex:pageBlockSection>
<apex:outputField value={!Response_Time__c}
style={!IF(Response_Time__c > 3, 'color:red;', '')} />
</apex:pageBlockSection>
}
}
Problem is I am getting syntax error "Line 1 Unexpected token '{'." Can't figure out what the issue is.
public class Hl{
<apex:pageBlockSection>
<apex:outputField value={!Response_Time__c}
style={!IF(Response_Time__c > 3, 'color:red;', '')} />
</apex:pageBlockSection>
}
}
Problem is I am getting syntax error "Line 1 Unexpected token '{'." Can't figure out what the issue is.
You cannot have an apex:pageBlockSection component directly inside an apex class. These are used on VF pages
Your code should look something like below
Apex class:
VF page named MyPage: Related: https://trailhead.salesforce.com/content/learn/modules/visualforce_fundamentals/visualforce_custom_controllers
If this information helps, please mark the answer as best. Thank you
The code you provided does not show where the {!Response_Time__c} field is defined or what object it belongs to. I'm afraid we cannot move forward without the complete picture about the custom object and its fields, as well as the full code for the controller and Visualforce page
Recommend reviewing https://salesforce.stackexchange.com/questions/301162/could-not-resolve-the-entity-from-apexinputfield-value-binding-firstname
https://salesforce.stackexchange.com/questions/310357/error-could-not-resolve-the-entity-from-value-binding
If this information helps, please mark the answer as best. Thank you