none
How to add columns (fields) to header section of an alert e-mail?

    Question

  • Hi all,

    In a standard out of the box alert template, I want to add custom fields (e.g. Notes, Value p.a.) to the body of an alert e-mail, see photo:


    These cannot be any list/library built-in columns like 'Created', 'Created By' etc.

    The class responsible for those column in 'Alerttemplate.xml' is:

    <![CDATA[ </tr> </table> </td></tr></table> </td> </tr> <tr> <td class="vh" colspan="2">$Resources:Alerts_event_title;</td> <td class="vh">$Resources:Alerts_event_modified;</td> <td class="vh">$Resources:Alerts_event_modifiedby;</td> <td class="vh">&nbsp;</td> </tr> <tr> <td colspan="5" class="rulerow">&nbsp;</td> </tr> ]]>

    How can I add additional fields to that?


    • Edited by Lukas_UK Monday, March 9, 2015 1:31 PM
    Monday, March 9, 2015 1:01 PM

All replies

  • Clearly we don't know how to do it or it is not possible... Shame as this requirement tends to be a very popular one...
    • Edited by Lukas_UK Tuesday, March 17, 2015 8:52 AM
    Wednesday, March 11, 2015 11:12 AM
  • Since there was no input from anyone on the forum, I have come up with a following workaround:

    I could not add any more columns to the alert e-mail body for edited items so I used a 'Title' column to combine all the columns a wanted to display in the e-mail alert.

    These were the 'Prefix' - 'Suffix' 'Product' columns. On 'Edit' and 'New' forms, there is a piece of jquery to combine those 3 columns and store the value in a 'Title' column which is appropriately hidden from the views and forms. There is no 'Quick Edit' switched on in the list so jquery will always run setting a 'Title' column correctly.

     

    Users can see the relevant information right in their inbox so they won't have to log in to SP remotely to look up this information. 

    Tuesday, March 31, 2015 9:10 AM