SRC Notification issue

Hi Guys!

I require your advice how can I send out the notification for this customer which. Please find the attached document with the steps, I have followed.

I tired to use 

jscall( "htmlemailtemplates.getMailBody", "HTML_SM ADD", $L.file, $,email in $L.file) it also didn't work for me.

  • I'm gussing that the agency fields are the identifier for the agency and not the email adddress. The notification engine does not have a default configuration to retrieve the related email address from the dept table. Also, if they are intended to hold the actual email address values, are you populating the fields in the background on record add/save? If you check the fields are they populated in the newly opened ticket?

    You could retrieve the email address based on the department value saved in the record when executing the notification. The script below provides a starting point (you would define a second function for the secondary agency). Based on the primary agency value in the record, it queries the dept table for a matching (change this field as needed). If a matching dept record is found, it returns::

    1) the dept email address as "$L.primaryAgencyEmail" which can be used as the notification recipient and

    2) returns a value of true or false (needtosend) which is used as the condition result so that if no matching dept record is found, the condition is set to false and SM does not attempt to send a notification.

    *  Function to get the primary agency email address.   
    * Called by Notification Defintion "IM ???? ????" *****************************************************************/

    function getPrimaryAgencyEmail() {
    var needToSend = false var recDept = new SCFile("dept"); // Select the Department Record for the primary agency specified in the record if ( recDept.doSelect("\"" vars.$L_file.primary_agency "\"") == RC_SUCCESS ) { vars.$L_primaryAgencyEmail =;
    needToSend = true; } return needToSend; }

    In the notification defintion, call the function above in the condition. (Remember that the function will return true or false depending on whether a dept record is found), and then use the returned email address as the recipient value. 


    The HTML notification uses the recipient specified in the notification defintion. There is no need to include it as a parameter in the jscall for the notification: You actually don't even need $ if the notification is not referencing the saved record.

    jscall( "htmlemailtemplates.getMailBody", "HTML_SM ADD", $L.file, $ 
    jscall( "htmlemailtemplates.getMailBody", "HTML_SM ADD", $L.file)


  • Could you clarify couple of things:

    • which SRC version you use?
    • are you using (or is it your intention to use) Dynamic Field Validations to retrieve email address from dept table?
    • And you have used SRC Tailoring - added and to your customized Checkout screen (and mapped the right fields).
    • Are you currently able to retrieve any value to and fields?

    If you're using Dynamic Field Validations, please add a screenshot from the item's fields User Selections and its Dynamic Validations.

    i'm trying to understand were you are standing - and in my view, you should be able to pull the email addresses from dept via SRC by using Dynamic Field Validations and no additional scripting is needed.