• SFDC2 Admin2 7
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello everyone,

So I had two buttons that were working fine up until yesterday and now both of them are coming back with the same exact error message. They both do the same thing, allow an attachment to a list of e-mail addresses while date stamping a value. Their last modified date was 5/16/2016 and now they are both not working. Here is my code, I haven't run any updates. I am also willing to change this button as long as the same things can be accomplished.
 
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")} 

location.replace('/email/author/emailauthor.jsp?retURL=/{!Opportunity.Id}&rtype=003&p24={!Opportunity.OwnerEmail}&p4=(___EMAIL ADDRESSES REMOVED PURPOSELY___)&template_id=239291302&p6={!Opportunity.Name}'); 

var oppObj = new sforce.SObject("Opportunity"); 
oppObj.Id = '{!Opportunity.Id}'; 

var build = new Date(); 

var month = build.getMonth(); 

var day = build.getDate(); 

var year = build.getFullYear(); 

var today = new Date(year,month,day); 
try 
{ 
oppObj.CL2_Binder_Date__c = today; 
sforce.connection.update([oppObj]); 
} 
catch(e) 
{ 
console.log(e.message); 
}

 
Hello everyone,

So I had two buttons that were working fine up until yesterday and now both of them are coming back with the same exact error message. They both do the same thing, allow an attachment to a list of e-mail addresses while date stamping a value. Their last modified date was 5/16/2016 and now they are both not working. Here is my code, I haven't run any updates. I am also willing to change this button as long as the same things can be accomplished.
 
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")} 

location.replace('/email/author/emailauthor.jsp?retURL=/{!Opportunity.Id}&rtype=003&p24={!Opportunity.OwnerEmail}&p4=(___EMAIL ADDRESSES REMOVED PURPOSELY___)&template_id=239291302&p6={!Opportunity.Name}'); 

var oppObj = new sforce.SObject("Opportunity"); 
oppObj.Id = '{!Opportunity.Id}'; 

var build = new Date(); 

var month = build.getMonth(); 

var day = build.getDate(); 

var year = build.getFullYear(); 

var today = new Date(year,month,day); 
try 
{ 
oppObj.CL2_Binder_Date__c = today; 
sforce.connection.update([oppObj]); 
} 
catch(e) 
{ 
console.log(e.message); 
}