• NattyForce
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 6
    Replies

I have a custom object that we put through the approval process and a custom button that allows for bulk approval from a list view. The button does not work for the designated approver but it will work for me, the administrator, and for users above the manager in the salesforce heirarchy. Is there something within salesforce preventing this functionality from working for the designated approver? We use custom approver fields if that makes any difference.

 

The button is an onClick JavaScript button, here is the script: 

{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")} //adds the proper code for inclusion of AJAX toolkit 
var url = parent.location.href; //string for the URL of the current page 
var records = {!GETRECORDIDS($ObjectType.Event__c)}; //grabs the Event records that the user is requesting to update 
var updateRecords = []; //array for holding records that this code will ultimately update 

if (records[0] == null) { //if the button was clicked but there was no record selected 
alert("Please select at least one record to update."); //alert the user that they didn't make a selection 
} else { //otherwise, there was a record selection 
for (var a=0; a<records.length; a++) { //for all records 
var update_Event = new sforce.SObject("Event__c"); //create a new sObject for storing updated record details 
update_Event.Id = records[a]; //set the Id of the selected Event record 
update_Event.Event_Status__c = "Approved"; //set the value for Status to 'Approved' 
updateRecords.push(update_Event); //add the updated record to our array 
} 
result = sforce.connection.update(updateRecords); //push the updated records back to Salesforce 
parent.location.href = url; //refresh the page 
}

 

The button simply changes the picklist value but does not work for the user designated as approver in the approval process field. 

 

-Natty

I'm using a VF page for a survey. The survey has a few instances of branch logic using the render attribute to show the pertinent questions. 

 

How can I 'reset' the value of the unrendered fields to NULL? For instance If I choose branch one, answer a few questions only to realize I need branch two, I don't want the values of questions in branch one to be saved. I hope I'm explaining this clearly. Any ideas or suggestions?

 

Thanks in advance

 

-Natty

I need to pull from an MS SQL table and populate a custom object with the data. I will not be writing to the MS SQL table but I need to periodically check for updates/new records and perform an upsert in Salesforce when neccessarry. Any suggestions on how/where to get started? Thanks

 

-Natty

 

 

I'm capturing emails (via email-to-case) that are triggered by an automated export outside of sForce. The export happens every three hours, 24 hours a day, 7 days a week. I'd like to fire an e-mail alert to myself and my mamanger if these emails AREN'T received. In other words, if a case isn't created every three hours by this email-to-case process I need to know immediately.

 

Any ideas as to how to accomplish this? Is something like this even possible?

 

-Natty

I have a field on a Master-Detial object that is being populated by a custom button using a URL. The child object is a junction object connecting Accounts and our custom Event object. The junction object is storing RSVPs to these events. The URL automatically pulls the Name and County data stored on the Account. The County is used to then search for Events within that County. We have a problem where every time Harris county is pulled it defaults to the first event with the word 'harris' in it. Is there a way of ensuring that only the County is pulled into this field? 

 

Hopefully I'm explaining this in a way that makes sense. Here is my URL

 

https://na7.salesforce.com/a0F/e?CF00NA0000004JwQp={!Account.Name}&CF00NA0000004JwQp_lkid={!Account.Id}&CF00NA0000004JwRJ={!Account.Physical_County__c}&saveURL=%2F{!Account.Id}&retURL=%2F{!Account.Id}

 

-Natty

Is there a way to reconstruct/recreate a dashboard in a visualforce page?

 

I am happy with all of the standard Salesforce dashboard components but I need to display them in a way other than the standard three column format. Is this possible? We have several large flat screen monitors posted on our sales floor but the three column layout doesn't use all of the horizontal real estate on the screen and some of the componenets are cut off becaue there isn't as much vertical space. 

 

I essentially need to restyle the existing dashboard to fit the horizontal layout of the monitors. Our execs are requesting more visual metrics and they will not be visible in the standard layout. If anyone can give me some suggestions or point me to some code samples I'd really appreciate it.

 

Full disclosure: I am not a coder. I know enough HTML and CSS to be dangerous and I can implement/tweak just about any Javascript I find out in the wild. Thanks in advance.

 

-Natty

I'm completely new to Apex Code and OOP in general. I have written two simple, and probably poorly formed, triggers to update/clear some fields based on certain criteria. The triggers are working as expected in the sandbox but I cannot deploy without test methods. Any help/assisstance would be greatly appreciated.

 

I've looked at a few other threads about test methods but cannot for the life of me wrap my head around them.

 

Trigger #1:

trigger disagreeCompliance on CTM__c (before insert, before update) {

 for(CTM__c ctm : trigger.new){
  if(ctm.Disagree_with_Root_Cause_Checkbox__c != FALSE && ctm.Verified_By_1__c == null){
   ctm.Verified_Process_Improvement_Step_1__c = null;
   ctm.Verified_Responsible_Party_1__c = null;
   ctm.Verified_Completion_Date_1__c = null;
  }
  if(ctm.Disagree_with_Root_Cause_Checkbox__c != FALSE && ctm.Verified_By_2__c == null){
   ctm.Verified_Process_Improvement_Step_2__c = null;
   ctm.Verified_Responsible_Party_2__c = null;
   ctm.Verified_Completion_Date_2__c = null;
  }
  if(ctm.Disagree_with_Root_Cause_Checkbox__c != FALSE && ctm.Verified_By_3__c == null){
   ctm.Verified_Process_Improvement_Step_3__c = null;
   ctm.Verified_Responsible_Party_3__c = null;
   ctm.Verified_Completion_Date_3__c = null;
  }
  if(ctm.Disagree_with_Root_Cause_Checkbox__c != FALSE && ctm.Verified_By_4__c == null){
   ctm.Verified_Process_Improvement_Step_4__c = null;
   ctm.Verified_Responsible_Party_4__c = null;
   ctm.Verified_Completion_Date_4__c = null;
  }
  if(ctm.Disagree_with_Root_Cause_Checkbox__c != FALSE && ctm.Verified_By_5__c == null){
   ctm.Verified_Process_Improvement_Step_5__c = null;
   ctm.Verified_Responsible_Party_5__c = null;
   ctm.Verified_Completion_Date_5__c = null;
  }
 }
}



Trigger #2:

trigger complianceVerified on CTM__c (before insert, before update) {

 for(CTM__c ctm : trigger.new){
  if(ctm.Process_Improvement_Step_1__c != null && ctm.Disagree_with_Root_Cause_Checkbox__c != TRUE){
   ctm.Verified_Process_Improvement_Step_1__c = ctm.Process_Improvement_Step_1__c;
   ctm.Verified_Responsible_Party_1__c = ctm.Process_Improvement_Responsible_Party_1__c;
   ctm.Verified_Completion_Date_1__c = ctm.Process_Improvement_Completion_Date_1__c;
  }
  if(ctm.Process_Improvement_Step_2__c != null && ctm.Disagree_with_Root_Cause_Checkbox__c != TRUE){
   ctm.Verified_Process_Improvement_Step_2__c = ctm.Process_Improvement_Step_2__c;
   ctm.Verified_Responsible_Party_2__c = ctm.Process_Improvement_Responsible_Party_2__c;
   ctm.Verified_Completion_Date_2__c = ctm.Process_Improvement_Completion_Date_2__c;
  }
  if(ctm.Process_Improvement_Step_3__c != null && ctm.Disagree_with_Root_Cause_Checkbox__c != TRUE){
   ctm.Verified_Process_Improvement_Step_3__c = ctm.Process_Improvement_Step_3__c;
   ctm.Verified_Responsible_Party_3__c = ctm.Process_Improvement_Responsible_Party_3__c;
   ctm.Verified_Completion_Date_3__c = ctm.Process_Improvement_Completion_Date_3__c;
  }
  if(ctm.Process_Improvement_Step_4__c != null && ctm.Disagree_with_Root_Cause_Checkbox__c != TRUE){
   ctm.Verified_Process_Improvement_Step_4__c = ctm.Process_Improvement_Step_4__c;
   ctm.Verified_Responsible_Party_4__c = ctm.Process_Improvement_Responsible_Party_4__c;
   ctm.Verified_Completion_Date_4__c = ctm.Process_Improvement_Completion_Date_4__c;
  }
  if(ctm.Process_Improvement_Step_5__c != null && ctm.Disagree_with_Root_Cause_Checkbox__c != TRUE){
   ctm.Verified_Process_Improvement_Step_5__c = ctm.Process_Improvement_Step_5__c;
   ctm.Verified_Responsible_Party_5__c = ctm.Process_Improvement_Responsible_Party_5__c;
   ctm.Verified_Completion_Date_5__c = ctm.Process_Improvement_Completion_Date_5__c;
  }
 }
}



Is there a way have the actual field values drive the dashboards? It seems that each component compiles record counts and displays the graphs/gauges accordingly. I'd like to have the graphs and gauges based on data in a particular custom field instead of record counts.

 

For instance: If I want a graph detailing how many Blue Widgets we have is there a way to have the graph based on whatever value I put into a field called Blue Widgets rather than counting the number of Blue Widget records?

 

Any help would be greatly appreciated.

 

-natty

I need the time to display in the 'hh:mm AM/PM' format.

 

I've written a formula that pulls the time from a standard Date/Time field and converts GMT to EST while taking daylight savings time into account.

 

IF(DATEVALUE(Date_Time__c) <= DATE(2011,03,12) || DATEVALUE(Date_Time__c) >= DATE(2011,11,06),


/* checks to see if date falls between Daylight Savings adjustment dates (would have to be updated once a year) */


TEXT(IF(VALUE(MID(TEXT(Date_Time__c),12,2)) <= 17, VALUE(MID(TEXT(Date_Time__c),12,2)) - 5, VALUE(MID(TEXT(Date_Time__c),12,2)) - 17)),

TEXT(IF(VALUE(MID(TEXT(Date_Time__c),12,2)) <= 16, VALUE(MID(TEXT(Date_Time__c),12,2)) - 4, VALUE(MID(TEXT(Date_Time__c),12,2)) - 16)))


/* adjusts hours for EST & Daylight Savings according to date */


&

MID(TEXT(Date_Time__c),14,3)


/* displays minutes */


&

IF(VALUE(MID(TEXT(Date_Time__c),12,2)) <= 16, " AM", " PM")


/* checks GMT time and adds 'AM' or 'PM' based on results */

 

When I try to add the conditional "0" on the front end (using LPAD) I get the 'too big to execute' error we're all so familiar with.

 

I've already tried putting the hour calculations in a separate field and referencing that hidden field in the IF statement for the conditional "0". No dice.

 

Anyone have an idea of how to do this more simply? Thanks in advance.

 

-Leonard

I'm using a VF page for a survey. The survey has a few instances of branch logic using the render attribute to show the pertinent questions. 

 

How can I 'reset' the value of the unrendered fields to NULL? For instance If I choose branch one, answer a few questions only to realize I need branch two, I don't want the values of questions in branch one to be saved. I hope I'm explaining this clearly. Any ideas or suggestions?

 

Thanks in advance

 

-Natty

I'm capturing emails (via email-to-case) that are triggered by an automated export outside of sForce. The export happens every three hours, 24 hours a day, 7 days a week. I'd like to fire an e-mail alert to myself and my mamanger if these emails AREN'T received. In other words, if a case isn't created every three hours by this email-to-case process I need to know immediately.

 

Any ideas as to how to accomplish this? Is something like this even possible?

 

-Natty

I'm completely new to Apex Code and OOP in general. I have written two simple, and probably poorly formed, triggers to update/clear some fields based on certain criteria. The triggers are working as expected in the sandbox but I cannot deploy without test methods. Any help/assisstance would be greatly appreciated.

 

I've looked at a few other threads about test methods but cannot for the life of me wrap my head around them.

 

Trigger #1:

trigger disagreeCompliance on CTM__c (before insert, before update) {

 for(CTM__c ctm : trigger.new){
  if(ctm.Disagree_with_Root_Cause_Checkbox__c != FALSE && ctm.Verified_By_1__c == null){
   ctm.Verified_Process_Improvement_Step_1__c = null;
   ctm.Verified_Responsible_Party_1__c = null;
   ctm.Verified_Completion_Date_1__c = null;
  }
  if(ctm.Disagree_with_Root_Cause_Checkbox__c != FALSE && ctm.Verified_By_2__c == null){
   ctm.Verified_Process_Improvement_Step_2__c = null;
   ctm.Verified_Responsible_Party_2__c = null;
   ctm.Verified_Completion_Date_2__c = null;
  }
  if(ctm.Disagree_with_Root_Cause_Checkbox__c != FALSE && ctm.Verified_By_3__c == null){
   ctm.Verified_Process_Improvement_Step_3__c = null;
   ctm.Verified_Responsible_Party_3__c = null;
   ctm.Verified_Completion_Date_3__c = null;
  }
  if(ctm.Disagree_with_Root_Cause_Checkbox__c != FALSE && ctm.Verified_By_4__c == null){
   ctm.Verified_Process_Improvement_Step_4__c = null;
   ctm.Verified_Responsible_Party_4__c = null;
   ctm.Verified_Completion_Date_4__c = null;
  }
  if(ctm.Disagree_with_Root_Cause_Checkbox__c != FALSE && ctm.Verified_By_5__c == null){
   ctm.Verified_Process_Improvement_Step_5__c = null;
   ctm.Verified_Responsible_Party_5__c = null;
   ctm.Verified_Completion_Date_5__c = null;
  }
 }
}



Trigger #2:

trigger complianceVerified on CTM__c (before insert, before update) {

 for(CTM__c ctm : trigger.new){
  if(ctm.Process_Improvement_Step_1__c != null && ctm.Disagree_with_Root_Cause_Checkbox__c != TRUE){
   ctm.Verified_Process_Improvement_Step_1__c = ctm.Process_Improvement_Step_1__c;
   ctm.Verified_Responsible_Party_1__c = ctm.Process_Improvement_Responsible_Party_1__c;
   ctm.Verified_Completion_Date_1__c = ctm.Process_Improvement_Completion_Date_1__c;
  }
  if(ctm.Process_Improvement_Step_2__c != null && ctm.Disagree_with_Root_Cause_Checkbox__c != TRUE){
   ctm.Verified_Process_Improvement_Step_2__c = ctm.Process_Improvement_Step_2__c;
   ctm.Verified_Responsible_Party_2__c = ctm.Process_Improvement_Responsible_Party_2__c;
   ctm.Verified_Completion_Date_2__c = ctm.Process_Improvement_Completion_Date_2__c;
  }
  if(ctm.Process_Improvement_Step_3__c != null && ctm.Disagree_with_Root_Cause_Checkbox__c != TRUE){
   ctm.Verified_Process_Improvement_Step_3__c = ctm.Process_Improvement_Step_3__c;
   ctm.Verified_Responsible_Party_3__c = ctm.Process_Improvement_Responsible_Party_3__c;
   ctm.Verified_Completion_Date_3__c = ctm.Process_Improvement_Completion_Date_3__c;
  }
  if(ctm.Process_Improvement_Step_4__c != null && ctm.Disagree_with_Root_Cause_Checkbox__c != TRUE){
   ctm.Verified_Process_Improvement_Step_4__c = ctm.Process_Improvement_Step_4__c;
   ctm.Verified_Responsible_Party_4__c = ctm.Process_Improvement_Responsible_Party_4__c;
   ctm.Verified_Completion_Date_4__c = ctm.Process_Improvement_Completion_Date_4__c;
  }
  if(ctm.Process_Improvement_Step_5__c != null && ctm.Disagree_with_Root_Cause_Checkbox__c != TRUE){
   ctm.Verified_Process_Improvement_Step_5__c = ctm.Process_Improvement_Step_5__c;
   ctm.Verified_Responsible_Party_5__c = ctm.Process_Improvement_Responsible_Party_5__c;
   ctm.Verified_Completion_Date_5__c = ctm.Process_Improvement_Completion_Date_5__c;
  }
 }
}



Is there a way have the actual field values drive the dashboards? It seems that each component compiles record counts and displays the graphs/gauges accordingly. I'd like to have the graphs and gauges based on data in a particular custom field instead of record counts.

 

For instance: If I want a graph detailing how many Blue Widgets we have is there a way to have the graph based on whatever value I put into a field called Blue Widgets rather than counting the number of Blue Widget records?

 

Any help would be greatly appreciated.

 

-natty

Hi,
 
I am trying to get the hour of the 'Date/Time Opened' field within Cases.  Ideally I'd like to be able to pull something like 4:00 PM or 20:00, or something along these lines.
 
Anybody know a way to do this with a formula?
 
Thanks!!

Message Edited by JWOODY on 10-18-2006 09:25 PM

  • October 19, 2006
  • Like
  • 0