function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hector DiazHector Diaz 

"AND" Function VisualForce page

Hi
anyone can help me to verify if my "and" function goes well, because doesnt work my code.
tks in advance

<apex:page standardController="QA_Order_Control__c" rendered="{(!QA_Order_Control__c.Line_Item_Brands_Opp_B__c== 'EMC')&&(!QA_Order_Control__c.OPS360_Status__c=='01.SentToOpps') }">


 <script type="text/javascript">
  { window.alert("Ponte Chingon"); }
 </script>
</apex:page>
Best Answer chosen by Hector Diaz
Prady01Prady01
rendered="{!IF(AND(QA_Order_Control__c.Line_Item_Brands_Opp_B__c== 'EMC', QA_Order_Control__c.OPS360_Status__c=='01.SentToOpps'), TRUE, FALSE)}"

Hope this helps! and Hope its the right syntax :D
Prady01

All Answers

Prady01Prady01
rendered="{!IF(AND(QA_Order_Control__c.Line_Item_Brands_Opp_B__c== 'EMC', QA_Order_Control__c.OPS360_Status__c=='01.SentToOpps'), TRUE, FALSE)}"

Hope this helps! and Hope its the right syntax :D
Prady01
This was selected as the best answer
William TranWilliam Tran
Be sure you really wanted AND not OR, either way, this is what I would use:


rendered="{!AND(QA_Order_Control__c.Line_Item_Brands_Opp_B__c== 'EMC', QA_Order_Control__c.OPS360_Status__c=='01.SentToOpps')}"

rendered="{!OR(QA_Order_Control__c.Line_Item_Brands_Opp_B__c== 'EMC', QA_Order_Control__c.OPS360_Status__c=='01.SentToOpps')}"


thx
Hector DiazHector Diaz
Thanks Guys, your solutions works excellent.