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
Suzanne TimmerhansSuzanne Timmerhans 

Visualforce Error Message

I keep getting an error message when I try to preview even after I changed the value from O to 1.  Also, it has been running in production but now I need to revise it and cannot see a Preview.  This was written by a consultant - so I am hoping to correct it without incurring additional charges from him. 

When I click Preview The message reads:

Visualforce Error Help for this Page  The value 'null' is not valid for operator '>' Error is in expression '{!AND(not(isInPast), not(SeriesRegOnly), (Training_Class__c.Course__r.Max_Registrants__c - Training_Class__c.Num_of_Attendees__c)>0)}' in component <apex:commandButton> in page register.
Ramu_SFDCRamu_SFDC
Hi Suzanne, I guess one of the fields mentioned in the expression is null hence the error. To troubleshoot this further you would need to verify if the visualforce is overriding any standard buttons like new and edit.
You would need to verify that all the fields mentioned in the expression are filled with some values including the relationship fields that are on the parent record.
Suzanne TimmerhansSuzanne Timmerhans
Thanks – that gets me thinking since the Preview is set up with a fictitious course so the Max Registrants might be null on it. I will dig deeper but thanks for the direction. Suzanne Timmerhans Suzanne Timmerhans Associate Executive Director for Management Services IAC InterAgency Council of Developmental Disabilities Agencies, Inc. 150 West 30th Street, 15th Floor New York, NY 10001 Phone: 212-645-6360 Email: suzanne@iacny.org FAX: 212-627-8847