function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matthew BracewellMatthew Bracewell 

Lead View - Create new button

Hi,

Within the lead view i have the option to change status / owner / campaign of multiple leads at once by ticking them,

However i would like to add another button to update revisit date on multiple items - is this possible?
Matthew BracewellMatthew Bracewell
Found this code:

{!REQUIRESCRIPT("/soap/ajax/26.0/connection.js")} 
var url = parent.location.href; 
var records = {!GETRECORDIDS($ObjectType.Lead)}; 
var updateRecords = []; 

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_Lead = new sforce.SObject("Lead"); 
update_Lead.Id = records[a]; //set the Id of the selected Lead record 
update_Lead.Industry = "Construction"; 
updateRecords.push(update_Lead); 

result = sforce.connection.update(updateRecords); 
parent.location.href = url; //refresh the page 
}

However if i use this for the date field on my List Button how do i get it to bring up a calender to select the date as opposed to just presetting it to a set date