• Shamus Kelley 4
  • NEWBIE
  • 25 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 9
    Replies
I have this OnClick java button that I need to modify so that it also marks a custom field True while processing. Here is the current code:

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

// Call the web service method to display the Email Author JSP page for 
// the Work Order email template. Result is an object with success="true" or "false" 
// and msg = "error message or other string." 
try { 
var result = sforce.apex.execute( 
'Work_Order_Buttons', // class name 
'sendWorkOrder', // methodName 

oppIdraw: "{!Work_Order__c.Id}" 

); 
if (result[0].success == 'true') { 
window.location.href = result[0].msg; 

else { 
alert(result[0].msg); 


catch (ex) { 
alert("Error: " + ex); 

any help is appreciated! thank you- 
Hello - 

I need to update the javascript within this button so that a custom field (i.e. counter__c) is updated every time the button is clicked. Any help is greatly appreciated! 

Here is the current OnClick Java Script that needs modification:

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/21.0/apex.js")} 
try{ 
// check that Opp has the necessary approvals in order to continue 
var strCheck = "{!Opportunity.Approval_Required__c}".toLowerCase(); 
if ( strCheck.indexOf("quote") == -1) { 
try{ 
var result = sforce.apex.execute( 
'Opportunity_Buttons', // class name 
'createQuote', // method name 
{ // arguments 
oppIDraw:"{!Opportunity.Id}", 
generateQuoteNum:"true" 

); 

if (result[0].success == 'true') { 
//window.location = result[0].msg; 
window.open(result[0].msg, "quoteWin"); 
} else alert(result[0].msg); 

catch(ex){ 
alert("Error: "+ex); 

} else alert("No Quote can be generated because Approvals are required"); 

catch (ex) { 
alert("Error: " + ex); 
}
Hello - 

I'm trying to update a number of opportunities via Data Loader but keep receiving an error message. hoping someone call help me resolve this. 

the error message is: "The record couldn't be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 30130000000PMSb. Contact your administrator for help."

i do have an active process builder flow but I don't see any issues with that one single record updates. 

thank you in advance. 

Shamus 
Hello - 

I'm looking to get insight into an API call that took place on a certain date for one of our connected apps. Is there a standard area to view this in or can this only be done in the developer console with a query? 

thank you!
I'm looking to track/count each time a custom button is clicked. i.e. each time Send Quote is clicked, i'd like to see the count go up incrementally. *This custom button is an onclick javascript. Thank you in advance.