You need to sign in to do that
Don't have an account?
Sam Cousins
How do I pass my inputHidden values to a controller to compare them to another property?
Hey all, I have the following:
and in my controller:
But it doesn't work. How do I store new cases and then make a condition evaluate to true if it's actually a new case?
Thanks.
<apex:inputHidden value="{!caseList1stLinePrevious.Subject}" id="theHiddenInput1" /> <apex:inputHidden value="{!caseList2ndLinePrevious.Subject}" id="theHiddenInput2" /> <apex:inputHidden value="{!caseList3rdLinePrevious.Subject}" id="theHiddenInput3" />
and in my controller:
public class ITSSDashboardController { public list<case> caseList1stLine{get;set;} public list<case> caseList2ndLine{get;set;} public list<case> caseList3rdLine{get;set;} public case caseList1stLinePrevious{get;set;} public case caseList2ndLinePrevious{get;set;} public case caseList3rdLinePrevious{get;set;} public ITSSDashboardController() { getCases(); } public PageReference getCases() { caseList1stLine = new list<case>(); caseList2ndLine = new list<case>(); caseList3rdLine = new list<case>(); caseList1stLinePrevious = new case(); caseList2ndLinePrevious = new case(); caseList3rdLinePrevious = new case(); caseList1stLine=[SELECT CaseNumber, SuppliedEmail, Day_Created__c,Days_Open__c, Subject FROM Case WHERE Owner.Type = 'Queue' AND Owner.Name = 'IT First Line' ORDER BY CreatedDate DESC]; caseList2ndLine=[SELECT CaseNumber, SuppliedEmail, Day_Created__c,Days_Open__c, Subject FROM Case WHERE Owner.Type = 'Queue' AND Owner.Name = 'IT Second Line' ORDER BY CreatedDate DESC]; caseList3rdLine=[SELECT CaseNumber, SuppliedEmail, Day_Created__c,Days_Open__c, Subject FROM Case WHERE Owner.Type = 'Queue' AND Owner.Name = 'IT Third Line' ORDER BY CreatedDate DESC]; if(caseList1stLinePrevious.Subject != caseList1stLine[0].Subject ) { caseList1stLinePrevious.Subject = caseList1stLine[0].Subject; caseList2ndLinePrevious.Subject = caseList2ndLine[0].Subject; caseList3rdLinePrevious.Subject = caseList3rdLine[0].Subject; // DOES NOT EVALUATE TO TRUE? } return null; } }
But it doesn't work. How do I store new cases and then make a condition evaluate to true if it's actually a new case?
Thanks.