• The Real Jonah Hust
  • NEWBIE
  • 10 Points
  • Member since 2016
  • Shield Global Partners

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I am attempting to embed a chart in a visualforce page that will reside on the a Case Page Layout. I have a couple of others that work perfectly, but this one I cant quite figure it out. 

If you click where the chart would be in the visualforce page, it takes you to the chart and populates the filters flawlessly, but on the visualforce page, it displays nothing. 

Any ideas?

Code:
<apex:page standardController="case">
<script type="text/javascript">
    function Click(){
        var url = '/00O1R000007i2rV?pn1=eq&pv1={!Case.Contact.name}';
        window.parent.location = url;
    }
</script>
<apex:outputLink onclick="Click();">
    
<analytics:reportChart reportId="00O1R000007i2rV" size="tiny" 
        cacheResults="false"
        filter="{column:'CONTACT.NAME',operator:'equals',value:'{!Case.Contact.Name}'}">
        
    </analytics:reportChart>
    
    </apex:outputLink>
</apex:page>
I  should start by saying I know very little about Java. I have pieced together a custom button that is used to update the open case record. The button works flawlessly, but I want to add code to check if its assigned to a user, and if it is, execute only the portion of the code that changes the priority. If its assigned to a queue, then the changes for Owner, Priority, and Status would need to execute. 

The code current code I have is:

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} 

var caseObj = new sforce.SObject("Case"); 
caseObj.Id = '{!Case.Id}'; 
caseObj.OwnerId = '00G36000001rInD'; 
caseObj.Status = "Ready to Move Forward"; 
caseObj.Priority = 'High' 
var result = sforce.connection.update([caseObj]); 
window.location.href=window.location.href;
I  should start by saying I know very little about Java. I have pieced together a custom button that is used to update the open case record. The button works flawlessly, but I want to add code to check if its assigned to a user, and if it is, execute only the portion of the code that changes the priority. If its assigned to a queue, then the changes for Owner, Priority, and Status would need to execute. 

The code current code I have is:

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} 

var caseObj = new sforce.SObject("Case"); 
caseObj.Id = '{!Case.Id}'; 
caseObj.OwnerId = '00G36000001rInD'; 
caseObj.Status = "Ready to Move Forward"; 
caseObj.Priority = 'High' 
var result = sforce.connection.update([caseObj]); 
window.location.href=window.location.href;