Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {!REQUIRESCRIPT ("/soap/ajax/13.0/connection.js")}
- var records ={!GETRECORDIDS($ObjectType.Contact)};
- var newRecords = [];
- var today = new Date();
- if (records[0] == null) {
- alert("Sélectionnez au moins un Contact")
- }
- else {
- for (var n=0; n<records.length; n++) {
- var c = new sforce.SObject("Contact");
- c.id = records[n];
- c.E_mail_proposition_intervention__c = true;
- c.Date_envoi_e_mail_proposition_interventi__c = today;
- newRecords.push(c);
- }
- result = sforce.connection.update(newRecords);
- window.location.reload();
- alert("E-mails envoyés");
- }`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement