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
Christina GarciaChristina Garcia 

Error Message when percentage has been reached

I created a visual force page to render when a field has hit 100% or more. I'm not getting any errors, below is the code I'm using. Is there an easier way to do this? I want it to render every time a user is clicking on these Accounts. 

<apex:page StandardController="Account"> <script> window.document.onload = new function(e)
{ if({!Account.Utilization__c != null && Account.Utilization__c > 1})

{ alert("This account is over 100 percent"); } }

</script> </apex:page>


Thanks so much!
Andrew EchevarriaAndrew Echevarria
A validation rule may be more useful to ensure organization-wide compliance.