How to add Delete button on Email-to-anything Unmatched Email List View page


Custom Delete button for Unmatched Emails List View

In order to configure and add the Delete button on Unmatched Emails List View, please proceed as follows:

 

  1. Go to Setup | Create | Objects and select e2a Unmatched Email
  2. Go to section Buttons, Links, and Actions
  3. Click New Button or Link to create new button.
  4.  Provide suitable Name and Label, e.g. Delete
  5. Select the Display Type: List Button
  6. To make button work on multiple selected records, please check Display Checkboxes (for Multi-Record Selection)
  7. Select Behavior: Execute JavaScript and Content Source: OnClick JavaScript
    Please see following screenshot for further clarification
  8. Add following code/JS in the code area and press Save

    {!REQUIRESCRIPT('/soap/ajax/29.0/connection.js')}

    try

    {

      var selectedRecords = {!GETRECORDIDS( $ObjectType.ortoo_e2a__Queued_Email_Message__c )};

      if(selectedRecords.length<1)

        alert('Please Select at Least One Row !');

      else

      {

        userConsent = confirm(

            selectedRecords.length +

            ' Record(s) will be Deleted. Continue ? '

          );

        if(userConsent == true)

        {

          delResult = sforce.connection.deleteIds(selectedRecords);

          if (delResult[0].getBoolean("success"))

          {

            alert('The Record(s) were Deleted Successfully.');

            window.location.reload();

          }

          else

            alert(

              'The Record(s) Could Not be Deleted. Error Message: ' +

              delResult[0].errors.message

            );

        } 

      }

    }

    catch(e)

    {

      alert('The Action Could not be Completed. Error Message: ' + e);

    }

     

  9. Now, on the same e2a Unmatched Email custom object's page, go to Search Layout section and Edit the Layout "e2a Unmatched Emails List View"
  10. Under Custom Buttons section, add 'Delete' to Selected Buttons column from Available Buttons and press Save

Delete button will now be added on the unmatched emails list view pages.

 

Please contact us at support@ortooapps.com for any questions.

Was this information helpful?

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please make sure you spelled the page name correctly or use the search box.

Support