You need to sign in to do that
Don't have an account?
Shravya Rama 9
Can anybody kindly let me know where am I wrong?
Apex Errors not functioning
if(res.Start__c < system.now()){ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,' Start Time should always be greater than current time.')); } if(res.end__c < system.now()){ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,' End Time should always be greater than current time.')); }I also used <apex:pageMessages/> in VF page.
Can anybody kindly let me know where am I wrong?
All Answers
What is the data type of Start__c and End__c. They should be of type DateTime. Thanks.
Yeah they are of DateTime datatype. And also the System.debug of Start__c and End_c are not showing the correct times. I have also thrown few other error messages from the same method which works perfectly fine but I dont know whats wrong with the above two.