{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/14.0/apex.js")}
var records = {!GETRECORDIDS($ObjectType.Contact)};
if (records[0] == null)
{
alert("Please select at least one contact")
}
else{
for (var n in records) {
var contact = new sforce.SObject("Contact");
contact.id =records[n];
contact.Status__c="Locked";
sforce.connection.update([contact]);
}
window.location.reload();
}
On Tue, Apr 22, 2014 at 5:49 PM, Krishnanand Gupta <krishnanand.gupta@gmail.com> wrote:
var contact = new sforce.SObject("Contact");contact.id ="{!Contact.Id}";contact.Status__c="Locked";sforce.connection.update([contact]);window.location.reload();
No comments:
Post a Comment