You need to sign in to do that
Don't have an account?
Tom Sine
Custom Button to Update a Date Field and Trigger an Email Alert
I have a custom button that completes a date field with the current date (see below). When this date is filled in on the record I then need an email to be sent. I have a workflow setup for this when the date field is populated without the button, but I cannot get it to work when the button is used. Any recommendations?
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
var newRecords = [];
var c = new sforce.SObject("Engineering_Request_for_Custom_Quote__c");
c.id ="{!Engineering_Request_for_Custom_Quote__c.Id}";
c.Project_Manager_Request__c = new Date();
newRecords.push(c);
result = sforce.connection.update(newRecords);
window.location.reload();
Thanks
Tom Sine
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
var newRecords = [];
var c = new sforce.SObject("Engineering_Request_for_Custom_Quote__c");
c.id ="{!Engineering_Request_for_Custom_Quote__c.Id}";
c.Project_Manager_Request__c = new Date();
newRecords.push(c);
result = sforce.connection.update(newRecords);
window.location.reload();
Thanks
Tom Sine
Please check debug logs.