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
Bryn JonesBryn Jones 

Coding problem

I am having issues with my coding. I am creating my on dashboard using google charts. I am trying to refence the sum of a feild i have in Account but i keep getting Error: Unknown property 'account' referenced in testing

This is my code. Could you alo provide how to limit it the value to a time frame.


<apex:page >
<html>
  <head>
    <script type='text/javascript' src='https://www.google.com/jsapi'></script>
    <script type='text/javascript'>
      google.load('visualization', '1', {packages:['gauge']});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Label', 'Value'],
          ['VE Sales', <apex:outputField value = "{!account.of_Lost_Opps__c}"/>],
          ['CPU', 55],
          ['Network', 68]
        ]);

        var options = {
          width: 1050, height: 700,
          redFrom: 90, redTo: 100,
          yellowFrom:75, yellowTo: 90,
          greenFrom:90, greenTo:150,
          minorTicks: 5, max: 150,
        };

        var chart = new google.visualization.Gauge(document.getElementById('chart_div'));
        chart.draw(data, options);
      }

   </script>
 
  </head>
  <body>
    <div id='chart_div'></div>
  </body>
</html>
</apex:page>
Best Answer chosen by Bryn Jones
Vinita_SFDCVinita_SFDC
Hello,

Call standard controller Account in your page. Like:

<apex:page standardController="Account">