Monday, 31 October 2011

Mass Delete Button for Standard and Custom objects.

i created  custom button(Mass Delete)  for standard and custom objects.Using Data loader only Delete the all records in custom objects but i created Custom button for Delete all the records in custom object. select all the records click on  Mass Delete  button then Deleted all the records at a time.
This is very useful code working perfectly

Mass Delete.

var idsToDelete = {!GETRECORDIDS( $ObjectType.Contact )};
var deleteWarning= 'Are you sure you wish to delete ' +idsToDelete.length+ ' Records?';
if(idsToDelete.length&& (window.confirm(deleteWarning)))
else if (idsToDelete.length == 0)
alert("Please select the contacts you wish to delete.!!");

No comments:

Post a Comment