You need to sign in to do that
Don't have an account?
Nicholas Patella
Custom Button to Check Box on Multiple Contact Records
I am trying to create a custom button that will allow me to select one or more Contacts from the "Contacts" related list on an Account page and then execute JavaScript which will update a specific field (in this case, simply setting a checkbox value to "true") on each of the selected Contacts. I would then use the updating of this checkbox value to trigger a workflow that would send out an email alert to those Contacts.
Here is how I've configured the custom button:
I've done a lot of searching around and found other posts about people trying to do a similar thing but for some reason the script I'm using just won't update that Contact field (doesn't throw an error, just refreshes the page without updating). Any ideas what I might be doing wrong here?
Here is how I've configured the custom button:
I've done a lot of searching around and found other posts about people trying to do a similar thing but for some reason the script I'm using just won't update that Contact field (doesn't throw an error, just refreshes the page without updating). Any ideas what I might be doing wrong here?
All Answers
{!requireScript("/soap/ajax/45.0/connection.js")}
var c = new sforce.SObject("Contact");
c.id = '{!Contact.Id}';
c.Send_Settings_Survey__c = true;
sforce.connection.update([c]);
window.location.reload();