How to automatically populate the Subject on outbound emails so that the email listener can process replies

Version 1

    Details

    Responses to outbound emails sent to customers will only populate if the Subject field is formatted correctly, i.e. 
    BusinessObject#[space]ValidRecordNumber (Incident# 12345).
     
    Out of the box, no default Subject is defined. When using the New Email function in the Activity History, the user must type the Subject manually. 
     
     This article explains how to format the subject so that it takes into account the module from which the email is being sent.


    Resolution

    The object type can be retrieved from the ParentLink_Category field. This solution creates an Editing Rule on Journal.Email:   Whenever ParentLink_RecId is changed set: Subject =  $(iif((nvl(Subject,"") == ""),   iif((ParentLink_Category == "Incident"),     ((("Incident# " + ToString([Incident#.]IncidentNumber)) + " - ") + [Incident#.]Subject),       iif((ParentLink_Category == "ServiceReq"),         ((("Service Request# " + ToString([ServiceReq#.]ServiceReqNumber)) + " - ") + [ServiceReq#.]Subject),         Subject       )     ),   Subject ))   Simply nest more iif() statements for other objects as necessary.