You need to sign in to do that
Don't have an account?
PriscillaO_
custom list button to update checkbox field for multiple records
Hi,
I'm getting an error when trying to do this:
click a custom list button in a specific Accounts list view that will update the Key Account checkbox field for the selected records.
checkbox field to update: Key_Account__c
custom button behavior: execute javascript
CUSTOM BUTTON CODE:
{!REQUIRESCRIPT("/soap/ajax/32.0/connection.js")}
if({!Account.Key_Account__c} == false)
{
var c = new sforce.SObject("Account");
c.id = "{!Account.Id}";
c.Key_Account__c = true;
result = sforce.connection.update([c]);
if ( result[0].getBoolean( "success" ) )
{
window.location.reload();
}
else
{
alert( result[0].errors.message);
}
}
else
{
alert("Already True");
}
Thank you in advance!!!
I'm getting an error when trying to do this:
click a custom list button in a specific Accounts list view that will update the Key Account checkbox field for the selected records.
checkbox field to update: Key_Account__c
custom button behavior: execute javascript
CUSTOM BUTTON CODE:
{!REQUIRESCRIPT("/soap/ajax/32.0/connection.js")}
if({!Account.Key_Account__c} == false)
{
var c = new sforce.SObject("Account");
c.id = "{!Account.Id}";
c.Key_Account__c = true;
result = sforce.connection.update([c]);
if ( result[0].getBoolean( "success" ) )
{
window.location.reload();
}
else
{
alert( result[0].errors.message);
}
}
else
{
alert("Already True");
}
Thank you in advance!!!
Your code is working I have tested in my Org and am using chrome.
Please check once javascript is enabled or not for your browser.
Thanks
Varaprasad
i need the button to update the Key_Account__c field for multiple records selected from a list view. Thanks!