• jasonkor
  • NEWBIE
  • 5 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 4
    Replies
We have created a custom button that currently works on a case list view.  I have not been able to reference or add this button to my visualforce page.  Please help

Object Name Case
Name Assign_Next_Tier_1_Case   
Behavior Execute JavaScript Display Type List Button


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

{!REQUIRESCRIPT("/soap/ajax/18.0/apex.js")}
var id = sforce.apex.execute("CaseAssignment_CS_Global","GetTier2NextCase",{userId:""});

var idtest = new String(id);

if (id!='' && idtest.length > 14) {


var querystringParams = "";
if (window.location.href.indexOf("isdtp=mn")!=-1) {
querystringParams = "?isdtp=mn";
} else if (window.location.href.indexOf("isdtp=vw")!=-1) {
querystringParams = "?isdtp=vw";
}


//We have successfully retrieved a case
navigateToUrl('/'+id + querystringParams);
} else {
if (id == '0000'){alert('No cases are available at this time.');}
else if (id == '0001'){alert('Error 1: Please contact the SF PM Team.');}
else {alert('Error 2: Please contact the SF PM Team.');}


}

I wrote this trigger, with help from the community, to update owner to current user upon status closed.  I am in need of a class and don't throughly understand the language yet (taking classes).  Does any one know where to start?

 

trigger CaseUpdate on Case (before update) {
List<User> usersRoleName =[select Id, Name, UserRole.Name  from User Where Id=:UserInfo.getUserId() AND UserRole.Name ='Technical Services'];
    if (Trigger.new.size() == 1) {  
        // if a Case has been updated to Closed
        if (Trigger.new[0].Status == 'Closed' && !usersRoleName.isEmpty()) {  
            // Change Trigger.old[0].OwnerId to Current User ID
            Trigger.new[0].OwnerId = UserInfo.getUserId();
        }
    }
}

I am trying to write a trigger to update the case owner to "current user" when the case is closed but I only want to do this for a particular role.  I believe the trigger below will update to current user on case close but I do not know how to limit it to a particular role.  Any help will be greatly appreciated.

 

trigger CaseUpdate on Case (before update) {
    if (Trigger.new.size() == 1) {  
        // if a Case has been updated to Closed
        if (Trigger.new[0].Status == 'Closed') {  
            // Change Trigger.old[0].OwnerId to Current User ID
            Trigger.new[0].OwnerId = UserInfo.getUserId();
        }
    }
}

We have created a custom button that currently works on a case list view.  I have not been able to reference or add this button to my visualforce page.  Please help

Object Name Case
Name Assign_Next_Tier_1_Case   
Behavior Execute JavaScript Display Type List Button


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

{!REQUIRESCRIPT("/soap/ajax/18.0/apex.js")}
var id = sforce.apex.execute("CaseAssignment_CS_Global","GetTier2NextCase",{userId:""});

var idtest = new String(id);

if (id!='' && idtest.length > 14) {


var querystringParams = "";
if (window.location.href.indexOf("isdtp=mn")!=-1) {
querystringParams = "?isdtp=mn";
} else if (window.location.href.indexOf("isdtp=vw")!=-1) {
querystringParams = "?isdtp=vw";
}


//We have successfully retrieved a case
navigateToUrl('/'+id + querystringParams);
} else {
if (id == '0000'){alert('No cases are available at this time.');}
else if (id == '0001'){alert('Error 1: Please contact the SF PM Team.');}
else {alert('Error 2: Please contact the SF PM Team.');}


}
I tried implementing the newly launched analytics report api on my visualforce page.
But it is refreshing again and again and loading time also more.
How can we reduce load time of charts on page load.

I wrote this trigger, with help from the community, to update owner to current user upon status closed.  I am in need of a class and don't throughly understand the language yet (taking classes).  Does any one know where to start?

 

trigger CaseUpdate on Case (before update) {
List<User> usersRoleName =[select Id, Name, UserRole.Name  from User Where Id=:UserInfo.getUserId() AND UserRole.Name ='Technical Services'];
    if (Trigger.new.size() == 1) {  
        // if a Case has been updated to Closed
        if (Trigger.new[0].Status == 'Closed' && !usersRoleName.isEmpty()) {  
            // Change Trigger.old[0].OwnerId to Current User ID
            Trigger.new[0].OwnerId = UserInfo.getUserId();
        }
    }
}

I am trying to write a trigger to update the case owner to "current user" when the case is closed but I only want to do this for a particular role.  I believe the trigger below will update to current user on case close but I do not know how to limit it to a particular role.  Any help will be greatly appreciated.

 

trigger CaseUpdate on Case (before update) {
    if (Trigger.new.size() == 1) {  
        // if a Case has been updated to Closed
        if (Trigger.new[0].Status == 'Closed') {  
            // Change Trigger.old[0].OwnerId to Current User ID
            Trigger.new[0].OwnerId = UserInfo.getUserId();
        }
    }
}

I tried implementing the newly launched analytics report api on my visualforce page.
But it is refreshing again and again and loading time also more.
How can we reduce load time of charts on page load.