Checkin Style and Email deletion

This is a note to clarify what happens to emails processed by CM EmailLink.

Content Manager 9.1

In CM 9.1 there are two check boxes which impact what happens to the email after it has been filed in CM.

In CM 9.1 there are two check boxes which impact what happens to the email after it has been filed in CM.

Content Manager 9.2

In CM 9.2 there is one combo-box to choose what happens to the email after filing.

In CM 9.2 there is one combo-box to choose what happens to the email after filing.

Mapping 9.1 to 9.2

The check boxes uses in 9.1 map to the (I believe) simpler UI in 9.2 like this:

  • Permanent Delete - no check boxes selected.
  • Move to Deleted Items - 'Keep email in the mail system' NOT selected and 'Move to deleted' selected.
  • Retain in Mail System - 'Keep email in the mail system' selected and 'Move to deleted' NOT selected.

What actually happens

After the email has been filed in Content Manager one of three things happens:

  • Permanent delete - the mail is hard deleted and is not available in the deleted items folder
  • Move to deleted items - if a mail prefix is set in System Options it is pre-pended to the subject and the unique Id of the Record is set in a custom property on the email.  Then the email is moved to the Deleted items folder.
  • Retain in Mail System - same as 'Move to deleted items' except the email is not moved to the Deleted Items folder.

Email Link - Delete Check in Style

The CM Rambler showed how to improve the Email Link Admin console, this post shows how you might add a facility to delete a user's Check in Style from within the admin console.  My main motivation for this is that there is a version of Content Manager out there which makes it difficult for a user to delete a user's check in style from the client, which is a problem when, for example, a user leaves the organisation.

 

The code

As per the video above

An empty TH

<th></th>

A table cell containing a button

<td><button class="btn btn-small" data-place-uri="@record.Uri">Delete</button></td> 

The script

$("button[data-place-uri!=''][data-place-uri]").on("click", function (event) {
    var placeUri = $(this).attr('data-place-uri');

    $.ajax({
        url: "CheckinPlace?q=Uri:" + placeUri + "&resultsOnly=true",
        data: {
            properties: "CheckinPlaceCheckinAs"
        },
        dataType: 'json'
    })
    .done(function (data) {

        for (var n = 0; n < data.Results.length; n++) {
            var place = data.Results[n];

            if (place.CheckinPlaceCheckinAs) {
                $.ajax({
                    url: "CheckinStyle/" + place.CheckinPlaceCheckinAs.Uri + "/Delete",
                    type: 'POST',
                    dataType: 'json',
                    contentType: 'application/json'
                })
                .done(function (response, statusText) {
                    if (statusText === "success") {
                        window.location.reload();
                    }
                })
            }
        }

    });

});

Configure Gmail in EmailLink

With the release of HPE Content Manager 9.0 Gmail is supported in EmailLink (ExchangeLink).  Here I demonstrate how to configure this.

Summary

In short, to set up the Google credentials:

  1. create a project,
  2. enable the Gmail API for the project,
  3. create a service account,
  4. create the credentials,
  5. save the P12 file, and
  6. configure the gmail scope for the service account.

Links

Here the links I used in this tutorial

Remember...

  • to create a P12 key when creating the credentials, 
  • there is no need to specify the User Name in the EmailLink authentication