You need to sign in to do that
Don't have an account?
Abhishek Kumar 149
what is meaning of below code.
acc= (id == '1' || id== '2') ? 'a: ' : ((id == '3' ) ? 'b: ' : '');
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
It is basically a terinary operator in salesforce
it is actually a replacement for we generally use this for conditional dataFormating in vf Page.
like say
style="{!if(opp.Name[THIS]=opp.Name[THIS -1],'color:gray', 'color:black')}"/>
Instead of the above , we use
style="{!opp.Name[THIS]==opp.Name[THIS -1]?'color:gray': 'color:black')}
IF(logical_test, value_if_true, value_if_false)
Example:
someVariable=(SomeOtherVariable == 'SomeValue'?TrueValue :FalseValue)
// someVariable will contain TrueValue if condition is true else will contain FalseValue
Thanks and Regards,
Shiva RV
You can execute below snippet in Anonymous window by changind id values as 1/2/3
Let me know if that helps you.
Best Regards,
BALAJI