Have you created an alert on one of your document libraries to let your users know when a new document is added or when an existing document is modified? This works great, but the hyperlink associated with the {itemlink} token goes to the display form for your file, not the file itself. Some users expect that the hyperlink in the e-mail message will open the file for them.
In other words, when your users click on the default link they see the meta data for the document in the document library and need to click on a link there to view the file. For some, this is one too many clicks. Here is how to customize the item link so it opens the file; follow these simple steps:
On the Event tab. There is really nothing special here, I just want to show you the name of my document library. I'm using the familiar Shared Documentslibrary and alerting when something is added OR modified. The special thing about this library is that it has folders; we need to consider the folder name in our customization of the {itemlink} token.
On the Mail Format Tab. Here, we compose the message that the e-mail recipient will get.
We have a slightly different message when an existing file is modified than when a new one is added. In both cases, we use the regular {itemlink} token. Notice that we also use a token called {FolderName} to identify the folder in the library where the file lives.
Because we don't want the default behavior of the {itemlink} token, we need to adjust it on the Options sub-tab (shown below) of the Mail Format tab.
We add a Custom Item Link by entering a URL in the box provided. The default link doesn't appear, but it did you would see something like this:
http://juliewss3:31152/Shared%20Documents/Forms/DispForm.aspx?{ID}
I added a custom URL that will open the file itself, regardless of the folder where it resides. My new link is:
http://juliewss3:31152/Shared%20Documents/{FolderPathName}/{Name}
This Custom Item Link applies only to this alert. Notice that we used a token {FolderPathName}. This is different than the token we used in the mail format {FolderName} because it will include nested folders with slashes appropriate for a path. The {FolderName} token includes just the folder name where the file resides which is more appropriate for my e-mail message text.
NOTE: Token names are case sensitive! If you use a token {foldername}, you won't see any data. You must use {FolderName}.
Comments
0 comments
Please sign in to leave a comment.