• Mahurrinah Sims
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I am creating a VF page with a google chart that I want to put on my account page layout. Right now I am testing in a sandbox. Here is the code:
<apex:page standardController="Account">
<html>
  <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {

  var data = google.visualization.arrayToDataTable([
    ['Year', 'Sales'],
    ['2011',  100],
    ['2012',  200],
    ['2013',  300],
    ['2014',  400]
  ]);

  var options = {
    title: 'Company Performance',
    hAxis: {title: 'Year', titleTextStyle: {color: 'red'}}
  };

  var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));

  chart.draw(data, options);

}
    </script>
  </head>
  <body>
    <div id="chart_div" style="width: 900px; height: 500px;"></div>
  </body>
</html>
   </apex:page>
This works fine. However, for the "sales" numbers I want to use my custom SF fields so that it will display the appropriate information for each account record. How would I do this?
How would I have an approval process start once someone tries to change ownership of an account record? I know I will need a bit of apex code. Is this possible for a beginner?
How would I have an approval process start once someone tries to change ownership of an account record? I know I will need a bit of apex code. Is this possible for a beginner?