Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement - Button on the Summary Logs List View for deleting Logs #474

Closed
DanDonin opened this issue Mar 3, 2017 · 2 comments
Closed

Comments

@DanDonin
Copy link
Contributor

DanDonin commented Mar 3, 2017

I just made a simple JS button to do this for me, it is a nice way to quickly remove logs without doing it 1 by 1 or doing it through dataloader.

{!REQUIRESCRIPT("/soap/ajax/36.0/connection.js")} 

var url = parent.location.href; 

var records = {!GETRECORDIDS($ObjectType.dlrs__LookupRollupSummaryLog__c)};

if (records[0] == null) { //if the button was clicked but there was no record selected

    alert("Please select at least one record to Delete."); //alert the user that they didn't make a selection 

} else { //otherwise, there was a record selection
    alert("Deleting " + records.length + " Records. Press Ok and wait for the page to reload.");
    var result = sforce.connection.deleteIds(records); 
    parent.location.href = url; //refresh the page
}
@afawcett
Copy link
Collaborator

afawcett commented Mar 8, 2017

Thansk @DanDonin ! 👍

@afawcett
Copy link
Collaborator

v2.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants