CA Service Management

 View Only
Expand all | Collapse all

Manual Notify, Not Working on Server

  • 1.  Manual Notify, Not Working on Server

    Posted Mar 16, 2017 09:41 PM

    Hey all,

     

    We are running an (AA) environment. One of the application servers the manual notify function is working correctly.

    On the second application server, the manual notify function is NOT working correctly.

     

    Both of the servers are running on 14.1.03. 

     

    When attempting to use manual notify on the BROKEN application server.
    When you click 'Manual Notify' nothing happens.

     

    There was some thought that this may be related to:

    https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec1801202.html 

     

    As we did see the following errors in our logs:

    Domsrvr 6156 ERROR domdict.c 1116 Signature error in manual_notify: arg[9] = nil with invalid type NIL

     

    Used ApplyATF to apply RO80229 then applied RO80218 for the english language. This process completed successfully. 

    The documentation references post-installation instructions. However, I cannot locate the file where it is indicating.

     

    As such, NO POST INSTALLATION steps have been followed. I started up the CA SDM service. Issue is exactly the same.

     

    If it is the post installation steps. Documentation would be helpful?

     

    And/or ... potentially another issue not related?

     

    Many thanks!



  • 2.  Re: Manual Notify, Not Working on Server

    Posted Mar 16, 2017 10:24 PM

    Hi jordanreich,

    I would like to know by any chance did you customize nf.htmpl file ?

    Also I would like to know whether you tried to compare nf.htmpl file from working and non-working APP servers.

     

    Thanks

    Junaid



  • 3.  Re: Manual Notify, Not Working on Server
    Best Answer

    Posted Mar 16, 2017 10:43 PM

    Hi JunaidBinGhalib,

     

    I have not done any modifications to nf.htmpl that I'm aware of.

    However, per your request I have compared the two files.

     

    I compared the two nf.htmpl located within:

     

     

     

    I did notice some differences between the two files. 

     

    I copied the nf.htmpl file from the working server and replaced its duplicate on the non-working server. After creating backup.

    Restarted services.

     

    Confirmed FIXED.

    Many thanks for your help!



  • 4.  Re: Manual Notify, Not Working on Server

    Posted Mar 16, 2017 10:46 PM

    Hi jordanreich,

     

    Great to hear that the issue got resolved.

     

    Regards

    Junaid



  • 5.  Re: Manual Notify, Not Working on Server

    Posted Mar 29, 2017 01:16 PM

    We are having the exact same issue, but we don't have any other server to compare the file.

     

    We installed SDM 14.1 (with the ISO CA has on its download page) and notice Manual Notify was not working, the button does not do anything. So we applyied cum 2 (14.1.02) and started working correctly, but other things stoped working so we needed to apply cum 3 (14.1.03) to fix that and now Manual Notify its not working again.

     

    We follow every post-installation step for every patch (14.1.02 and 14.1.03) but nothing, the button doesn't work.

     

    This is what gets registered on the log when we click on Notify button:

     

    03/29 11:09:39.55 SVBCWSVMGT01PP domsrvr 3588 ERROR where.y 908 Parse error at : "delete_flag = 0 AND id = U'smtp:jcsolis@mydomain.com'" (Bad where clause)
    03/29 11:09:39.57 SVBCWSVMGT01PP domsrvr 3588 ERROR where.y 908 Parse error at : "( delete_flag = 0 AND id = U'smtp:jcsolis@mydomain.com' ) AND ( delete_flag = 0 )" (Bad where clause)
    03/29 11:09:39.58 SVBCWSVMGT01PP web:local 8120 ERROR freeaccess.spl 6968 error in sync_fetch: AHD03053:Cláusula Where incorrecta: Parse error at : "( delete_flag = 0 AND id = U'smtp:jcsolis@mydomain.com' ) AND ( delete_flag = 0 )" (Bad where clause) in the function: generate_autosuggest_response()

     

    So i'm not sure this is .htmpl  related, to me it looks more like a js, but who knows.

     

    Any ideas?

     

    Thank you.



  • 6.  Re: Manual Notify, Not Working on Server

    Posted Mar 29, 2017 01:25 PM

    jcsolis,

    Here is our complete nf.htmpl file. Hopefully it is helpful.

     

    <PDM_IF 0>
    nf.htmpl
    WHEN PRESENTED:
        When the app performs a manual notification activity.
    INTENT:
        Capture user input for a manual notification, create a Activity Log
     and do the notification when submitted.  Used for cr, iss, and chg objects.
    VARIABLES:
        string image     The location of the image directory as
           specified in the config file.
        object alg   args     The arguments from the 'last' form
                                See $NX_ROOT/bopcfg/majic/cm.maj for the
                                definition of attributes for 'OBJECT alg'
           (this could be 'chgalg' or 'issalg' depending on the parent persid)
        int    logged_in   A flag to say we have a user login object.
        object cst cst     A cst object (customer) that is the logged in user.
    </PDM_IF>
    <html lang="en"><head>
    <PDM_PRAGMA RELEASE=110>
    <PDM_INCLUDE FILE=styles.htmpl>
    <script type="text/javascript" src="$CAisd/scripts/window_manager.js"></script>
    <script type="text/javascript" src="$CAisd/scripts/msgtext.js"></script>
    <script type="text/javascript">
    var emailtocclistflag=0;
    <PDM_IF "$prop.factory" == "chg">
    var alg_factory = "chgalg";
    var argRefNum = "$args.chg_ref_num";
    var argChgRefNum = "$args.chg_ref_num";
    var cfgEmailToCcList = "";
    var form_title = "Manual Notification for Change Order $args.chg_ref_num";
    <PDM_ELSE>
    var argRefNum = "$args.ref_num";
    <PDM_IF "$prop.factory" == "iss">
    var alg_factory = "issalg";
    var form_title =  "Manual Notification for Issue $args.ref_num";
    <PDM_ELSE>
    var alg_factory = "alg";
     <PDM_IF "$args.type" == "I">
      var form_title = "Manual Notification for Incident $args.ref_num";
     <PDM_ELIF "$args.type" == "P">
      var form_title = "Manual Notification for Problem $args.ref_num";
     <PDM_ELSE>
      var form_title = "Manual Notification for Request $args.ref_num";
     </PDM_IF>
    </PDM_IF>
    </PDM_IF>
    var edit_form = 1;
    var argPersistentID = "$args.persistent_id";
    var argCstID = "$cst.id";
    var argID = "$args.id";
    </script>
    <PDM_INCLUDE FILE=std_head.htmpl wm=no wm=no>
    <script>
    edit_form = 1;
    </script>
    <script type="text/javascript" src="$CAisd/scripts/arrow_button.js"></script>
    <script type="text/javascript" src="$CAisd/scripts/check_submit.js"></script>
    <script type="text/javascript" src="$CAisd/scripts/img_link.js"></script>
    <script type="text/javascript" src="$CAisd/scripts/detail_form.js"></script>
    <script type="text/javascript" src="$CAisd/scripts/update_lrel.js"></script>
    <script type="text/javascript" src="$CAisd/scripts/spellcheck.js"></script>
    <INPUT type="hidden" name="NEW_ATTMNTS" id="NEW_ATTMNTS">
    <script type="text/javascript">
    var autofill_return_time = 2000; // assumme autofill takes 2 secs to return
    var resp_sym = new Array();
    var resp_ids = new Array();
    var new_attmnts = new Array();
    var new_attmnt_wc = "";
    resp_sym[0] = "";
    resp_ids[0] = "";
    resp_field="KEEP.msgtxt";
    resp_persid='$args.persistent_id';

    <PDM_IF "$prop.factory" == "cr">
    <PDM_IF "$args.type" == "R" || "$args.type" == "">
     <PDM_LIST ESC_STYLE=JS2 prefix=list factory=response where="delete_flag=0 AND (response_owner IS NULL or response_owner = U'$cst.id') AND cr_flag=1">
      resp_sym[resp_sym.length] = decodeURIComponent('$list.sym');
      resp_ids[resp_ids.length] = '$list.id';
     </PDM_LIST>
    <PDM_ELIF "$args.type" == "I">
     <PDM_LIST ESC_STYLE=JS2 prefix=list factory=response where="delete_flag=0 AND (response_owner IS NULL or response_owner = U'$cst.id') AND in_flag=1">
      resp_sym[resp_sym.length] = decodeURIComponent('$list.sym');
      resp_ids[resp_ids.length] = '$list.id';
     </PDM_LIST>
    <PDM_ELIF "$args.type" == "P">
     <PDM_LIST ESC_STYLE=JS2 prefix=list factory=response where="delete_flag=0 AND (response_owner IS NULL or response_owner = U'$cst.id') AND pr_flag=1">
      resp_sym[resp_sym.length] = decodeURIComponent('$list.sym');
      resp_ids[resp_ids.length] = '$list.id';
     </PDM_LIST>
    </PDM_IF>
    <PDM_ELIF "$prop.factory" == "chg">
     <PDM_LIST ESC_STYLE=JS2 prefix=list factory=response where="delete_flag=0 AND (response_owner IS NULL or response_owner = U'$cst.id') AND chg_flag=1">
      resp_sym[resp_sym.length] = decodeURIComponent('$list.sym');
      resp_ids[resp_ids.length] = '$list.id';
     </PDM_LIST>
    <PDM_ELIF "$prop.factory" == "iss">
     <PDM_LIST ESC_STYLE=JS2 prefix=list factory=response where="delete_flag=0 AND (response_owner IS NULL or response_owner = U'$cst.id') AND iss_flag=1">
      resp_sym[resp_sym.length] = decodeURIComponent('$list.sym');
      resp_ids[resp_ids.length] = '$list.id';
     </PDM_LIST>
    </PDM_IF>

    // Show an alertmsg if the notification is marked internal and mail_allow_attmnts is on
    function internal_click ( select_obj )
    {
     <PDM_IF "$env.NX_MAIL_ALLOW_ATTMNTS" == "Yes" || "$env.NX_MAIL_ALLOW_ATTMNTS" == "1">
      var internal_val = select_obj.checked;
      AlertMsg = "";
      if (internal_val) {
       showAlertMsg(msgtext("Attachments_visible_to_End_Users"));
      }
      else {
       clearAlertMsg(window.parent);
       AlertMsg = "";
      }
     <PDM_ELSE>
      return;
     </PDM_IF>
    }

     /*CES 73424 and SCO# 53559- This method displays a popup if the added contact doesn't have email ID when preferred method is set as 'Email' */
     
    function isEmailIDExist(notifylist){
      var hasEMail=true;
      var prefMethod=document.main_form.elements["KEEP.pref_method"];
      var prefMethodItem;
      var userlist="";
      
      if (prefMethod.selectedIndex == -1){
       hasEMail=false;
      }
      else{
       prefMethodItem=prefMethod.options[prefMethod.selectedIndex].value;
      }
      // 1800 code for email notification
      if(prefMethodItem == "1800"){       
        for(var k=0;k<notifylist.length;k++){

         var comboname=notifylist.options[k].text;
         var user_uuid=notifylist.options[k].value;
         user_uuid = user_uuid.replace('cnt:','');

         // use the UUID in order to not have issues with multiple users having the same combo name or issues with other types of combinations
         var url=cfgCgi+"?SID="+cfgSID + "+FID=" + fid_generator()+"+OP=SEARCH+FACTORY=cnt+KEEP.IsPopUp=1+KEEP.backfill_field=KEY.combo_name+KEEP.backfill_form=main_form+KEEP.Is3FieldContact=0+KEEP.domset_name=RLIST_STATIC+QBE.EQ.delete_flag=0+QBE.EQ.id="+user_uuid+"+numAutosuggestRecords=10+common_name=email_address";

         var response = SyncAjaxCall( url );
         // When IIS is used, webengine append junk character after newline character in response.
         // So use response till newline character.
         
         if (response.lastIndexOf("\n") > 0 ) {
          response = response.substring(0, response.lastIndexOf("\n"));
         }
         var jsonData = jQuery.parseJSON(response);
         
         for (var i = 0; i < jsonData.length; i++) {
         

          if(jsonData[i].label.length == 0){
           userlist="["+comboname+"],"+userlist;
           hasEMail=false;
          }
         }

        }
       }
      else{
      hasEMail=true;
      }
      if(userlist.length>0){
       AlertMsg = "";   
       if( emailtocclistflag == 1 && notifylist.name == "notify_list"){
        showAlertMsg(msgtext("Email_id_does_not_exist_for_the_user")+userlist.substring(0,userlist.length-1)+" in To List");
       }
       else if( emailtocclistflag == 1 && notifylist.name == "notify_cc_list"){
        showAlertMsg(msgtext("Email_id_does_not_exist_for_the_user")+userlist.substring(0,userlist.length-1)+" in Cc List");
       }
       else{
        showAlertMsg(msgtext("Email_id_does_not_exist_for_the_user")+userlist.substring(0,userlist.length-1));
       }
       
      }
      return hasEMail;
     }
     
     function isRecipientExist(notifylist, recipient_value){
      var isRecipientExist=false;  
      for(var k=0;k<notifylist.length;k++){
         if(recipient_value == notifylist.options[k].text){
          isRecipientExist = true;
          break;
         }
         else{
          isRecipientExist = false;
         }
         

        }
      return isRecipientExist;
     }

     function show_alert(added, not, names) {
      var rec_str1;
      var rec_str2;
      if (not > 0)
      {
       if ( added == 1 )
        alertmsg("1_item_was_added._%1_already_in_the_li", not, names); // 1 item was added. %1 already in the list: %2
       else
        alertmsg("%1_items_were_added._%2_already_in_the_li", added, not, names); // %1 items were added. %2 already in the list: %3
      }
      else if (added > 0)
      {  
       if ( ahdtop.cstUsingScreenReader )
       {
        if ( added == 1 )
         alertmsg("1_item_was_added."); // 1 item was added.
        else
         alertmsg("%1_items_were_added.", added); // %1 items were added.
       }
      }
     }

     // Remove a contact from the selection list.
     function remove_cnt() {
      if (!document.main_form.notify_list.options.length)
       return;
      if (document.main_form.notify_list.selectedIndex >= 0) {
       var list = document.main_form.notify_list;
       for (var i = list.length - 1; i >= 0; --i) {
        if (list[i].selected) {
         var doomed_id = list[i].value;
         var id_list = document.main_form.elements["KEEP.the_notify_list"].value;
         document.main_form.elements["KEEP.the_notify_list"].value = id_list.replace(doomed_id, "");
         list.remove(list[i].index);
        }
       }
       document.getElementById("counter").innerHTML = document.main_form.notify_list.options.length;
      }
      else {
       alert("Select one of the recipients first");
      }
     }
     
     // Remove a contact from the selection list.
     function remove_cnt_cc() {
      if (!document.main_form.notify_cc_list.options.length)
       return;
      if (document.main_form.notify_cc_list.selectedIndex >= 0) {
       var list = document.main_form.notify_cc_list;
       for (var i = list.length - 1; i >= 0; --i) {
        if (list[i].selected) {
         var doomed_id = list[i].value;
         var id_list = document.main_form.elements["KEEP.the_notify_cc_list"].value;
         document.main_form.elements["KEEP.the_notify_cc_list"].value = id_list.replace(doomed_id, "");
         list.remove(list[i].index);
        }
       }
       document.getElementById("counter_cc").innerHTML = document.main_form.notify_cc_list.options.length;
      }
      else {
       alert("Select one of the recipients first");
      }
     }

     // formLoad event handler.
     // Add any initial contacts for notification as well
     // as any default message text.
     function initNames() {
      // Clear notify list since recipient list is being cleared after pressing F5
      document.main_form.elements["KEEP.the_notify_list"].value = "";
      document.main_form.elements["KEEP.msgtxt"].value = document.main_form.initial_msgtxt.value;
    <PDM_IF "$env.NX_NOTIFICATION_PREPOPULATE_STAKEHOLDERS" == "Yes">
      if (stake_index >= 0) {
       // Pre-populate stakeholders list
       var selname = arr_names[stake_index];
       var selid = arr_persids[stake_index];
       var arrNames = selname.split("##");
       var arrIds = selid.split("##");
       for (var j = 0; j < arrNames.length; j++) {
        add_to_list(arrNames[j], arrIds[j], false);
       }
       sort_options(document.main_form.notify_list);
      }
    </PDM_IF>
      document.getElementById("counter").innerHTML = document.main_form.notify_list.options.length; 
      <PDM_IF "$env.NX_MAIL_SHOW_TO_CC_LIST" == "Yes">
       cfgEmailToCcList = "yes";
       initNames_cc();
      <PDM_ELSE>
       cfgEmailToCcList = "no";   
      </PDM_IF> 
       
       
     }
     
     // formLoad event handler.
     // Add any initial contacts for notification as well
     // as any default message text.
     function initNames_cc() { 
      // Clear notify list since recipient list is being cleared after pressing F5
      document.main_form.elements["KEEP.the_notify_cc_list"].value = "";
      document.main_form.elements["KEEP.msgtxt"].value = document.main_form.initial_msgtxt.value;
    <PDM_IF "$env.NX_NOTIFICATION_PREPOPULATE_STAKEHOLDERS" == "Yes">
      if (stake_index >= 0) {
       // Pre-populate stakeholders list
       var selname = arr_names[stake_index];
       var selid = arr_persids[stake_index];
       var arrNames = selname.split("##");
       var arrIds = selid.split("##");
       for (var j = 0; j < arrNames.length; j++) {
        add_to_cc_list(arrNames[j], arrIds[j], false);
       }
       sort_options(document.main_form.notify_cc_list);
      }
    </PDM_IF>
      document.getElementById("counter_cc").innerHTML = document.main_form.notify_cc_list.options.length;
     }

     // Simply resets the notification message text
     function clear_msg() {
      document.main_form.elements["KEEP.msgtxt"].value = "";
      document.main_form.elements["KEEP.msgtitle"].value = "";
     }

     // Handles clicks on '>>' button, i.e. Add recipients
     function addEntries(entry) {

      if (entry == 1) {
       // Add selected Available Recipients
       if (!document.main_form.lhs.options.length)
        return;

       var sep = "";
       var not_added_count = 0;
       var rec_not_added = "";
       var items_count = 0;

       if (document.main_form.lhs.selectedIndex >= 0) {
        var list = document.main_form.lhs;
        for (var i = 0; i < list.length; i++) {
         if (list[i].selected) {
          var selname = arr_names[list[i].index];
          var selid = arr_persids[list[i].index];
          
          if(cfgEmailToCcList == "yes" && isRecipientExist(document.main_form.notify_cc_list, selname)){
           show_alert(0, 1, selname);
           break;
          }
          else if (list[i].index == stake_index) {
           // Populate stakeholders list
           var arrNames = selname.split("##");
           var arrIds = selid.split("##");
           items_count += arrNames.length;
           for (var j = 0; j < arrNames.length; j++) {
            if (!add_to_list(arrNames[j], arrIds[j], false)) {
             not_added_count++;
             rec_not_added += sep + arrNames[j];
             sep = ", ";
            }
           }
          }
          else if (selid.match(/##/)) {
           // Populate multiple entries
           var arrNames = selname.split("##");
           var arrIds = selid.split("##");
           items_count += arrNames.length;
           for (var j = 0; j < arrNames.length; j++) {
            if (!add_to_list(arrNames[j], arrIds[j], false)) {
             not_added_count++;
             rec_not_added += sep + arrNames[j];
             sep = ", ";
            }
           }
          }
          else  if (selname != "") {
           items_count++;
           if (!add_to_list(selname, selid, false)) {
            not_added_count++;
            rec_not_added += sep + selname;
            sep = ", ";
           }
          }
         }
        }
        sort_options(document.main_form.notify_list);
        document.getElementById("counter").innerHTML = document.main_form.notify_list.options.length;
        if (rec_not_added != "")
         show_alert(items_count - not_added_count, not_added_count, rec_not_added);
        else
         show_alert(items_count, 0, "");
       }
       else {
        alert("Select one of the recipients first");
       }
      }
      
      else if (entry == 11) {
       // Add selected Available Recipients
       if (!document.main_form.lhs.options.length)
        return;

       var sep = "";
       var not_added_count = 0;
       var rec_not_added = "";
       var items_count = 0;

       if (document.main_form.lhs.selectedIndex >= 0) {
        var list = document.main_form.lhs;
        for (var i = 0; i < list.length; i++) {
         if (list[i].selected) {
          var selname = arr_names[list[i].index];
          var selid = arr_persids[list[i].index];
          
          if(isRecipientExist(document.main_form.notify_list, selname)){
           show_alert(0, 1, selname);
           break;
          }

          else if (list[i].index == stake_index) {
           // Populate stakeholders list
           var arrNames = selname.split("##");
           var arrIds = selid.split("##");
           items_count += arrNames.length;
           for (var j = 0; j < arrNames.length; j++) {
            if (!add_to_cc_list(arrNames[j], arrIds[j], false)) {
             not_added_count++;
             rec_not_added += sep + arrNames[j];
             sep = ", ";
            }
           }
          }
          else if (selid.match(/##/)) {
           // Populate multiple entries
           var arrNames = selname.split("##");
           var arrIds = selid.split("##");
           items_count += arrNames.length;
           for (var j = 0; j < arrNames.length; j++) {
            if (!add_to_cc_list(arrNames[j], arrIds[j], false)) {
             not_added_count++;
             rec_not_added += sep + arrNames[j];
             sep = ", ";
            }
           }
          }
          else  if (selname != "") {
           items_count++;
           if (!add_to_cc_list(selname, selid, false)) {
            not_added_count++;
            rec_not_added += sep + selname;
            sep = ", ";
           }
          }
         }
        }
        
        sort_options(document.main_form.notify_cc_list);
        document.getElementById("counter_cc").innerHTML = document.main_form.notify_cc_list.options.length;
            
        if (rec_not_added != "")
         show_alert(items_count - not_added_count, not_added_count, rec_not_added);
        else
         show_alert(items_count, 0, "");
       }
       else {
        alert("Select one of the recipients first");
       }
      }

      else if (entry == 2) {
       // Add Contact textfield entry
       var selname = document.main_form.elements["recip_combo_name"].value;
       var selid = document.main_form.elements["SET.recip"].value;
       
       if ( selid == "" && autofill_in_progress) {
        // stop processing until autofill is done, resume on backfill function
        clicked_add = true;
        setTimeout("clicked_add = false", autofill_return_time);
        return;
       }
       document.main_form.elements["SET.recip"].value = "";
       document.main_form.elements["KEY.recip"].value = "";
       document.main_form.elements["recip_combo_name"].value = "";
       
       if(cfgEmailToCcList == "yes" && isRecipientExist(document.main_form.notify_cc_list, selname)){
           show_alert(0, 1, selname);
           
          }
          
       else if (!add_to_list(selname, selid, false))
        show_alert(0, 1, selname);
       else {
        sort_options(document.main_form.notify_list);
        document.getElementById("counter").innerHTML = document.main_form.notify_list.options.length;
        if (selname != "")
         show_alert(1, 0, "");
       }
      }
      
      else if (entry == 22) {
       // Add Contact textfield entry
       var selname = document.main_form.elements["recip_combo_name"].value;
       var selid = document.main_form.elements["SET.recip"].value;
       if ( selid == "" && autofill_in_progress) {
        // stop processing until autofill is done, resume on backfill function
        clicked_add = true;
        setTimeout("clicked_add = false", autofill_return_time);
        return;
       }
       document.main_form.elements["SET.recip"].value = "";
       document.main_form.elements["KEY.recip"].value = "";
       document.main_form.elements["recip_combo_name"].value = "";
       
       if(isRecipientExist(document.main_form.notify_list, selname)){
           show_alert(0, 1, selname);
           
          }
       
       else if (!add_to_cc_list(selname, selid, false))
        show_alert(0, 1, selname);
       else {
        sort_options(document.main_form.notify_cc_list);
        document.getElementById("counter_cc").innerHTML = document.main_form.notify_cc_list.options.length;
        if (selname != "")
         show_alert(1, 0, "");
       }
      }

      else if (entry == 3) {
       // Add Email Address entries
       var selemail = document.main_form.elements["selemail"].value;
       var arrEmails = selemail.split(/\s*;\s*/); // semicolon and spaces around it
       var invalids = "";
       var sep = "";
       var esep = "";
       var not_added_count = 0;
       var added_count = 0;
       var emails_not_added = "";

       for (var i = 0; i < arrEmails.length; i++) {
        var item = arrEmails[i];
        if (item == "") continue;

        // basic check for email address
        if (item.match(/@/) && !item.match(/@.*@/)) {
         if(cfgEmailToCcList == "yes" && isRecipientExist(document.main_form.notify_cc_list, item)){
           show_alert(0, 1, item);
           break;
          }
         else if (!add_to_list(item, item, true)) {
          not_added_count++;
          emails_not_added += sep + item;
          sep = ", ";
         }
         else
          added_count++;
        }
        else {
         invalids += esep + item;
         esep = "; ";
        }
       }   
       if (invalids != "")
        alert("Invalid email address: " + invalids);
       document.main_form.elements["selemail"].value = invalids;
       if (emails_not_added != "")
        show_alert(added_count, not_added_count, emails_not_added);    
       else{
        show_alert(added_count, 0, "");
        document.getElementById("counter").innerHTML = document.main_form.notify_list.options.length;
        }
      }
      
      else if (entry == 33) {
       // Add Email CC Address entries
       var selemail = document.main_form.elements["selemail"].value;
       var arrEmails = selemail.split(/\s*;\s*/); // semicolon and spaces around it
       var invalids = "";
       var sep = "";
       var esep = "";
       var not_added_count = 0;
       var added_count = 0;
       var emails_not_added = "";

       for (var i = 0; i < arrEmails.length; i++) {
        var item = arrEmails[i];
        if (item == "") continue;

        // basic check for email address
        if (item.match(/@/) && !item.match(/@.*@/)) {
         if(isRecipientExist(document.main_form.notify_list, item)){
           show_alert(0, 1, item);
           break;
          }
         else if (!add_to_cc_list(item, item, true)) {
          not_added_count++;
          emails_not_added += sep + item;
          sep = ", ";
         }
         else
          added_count++;
        }
        else {
         invalids += esep + item;
         esep = "; ";
        }
       }
       if (invalids != "")
        alert("Invalid email address: " + invalids);
       document.main_form.elements["selemail"].value = invalids;
       if (emails_not_added != "")
        show_alert(added_count, not_added_count, emails_not_added);
       else{
        show_alert(added_count, 0, "");
        document.getElementById("counter_cc").innerHTML = document.main_form.notify_cc_list.options.length;
       }
      }
     }

     // Add combo name/persid value to recipients list
     // Return false if item is already on the list
     function add_to_list(name, id, smtp) {
      if (id != "" && name != "") {
       if (smtp) {
        if (id.search("smtp:") == -1)
         id="smtp:" + id;
       }
       else {
        if (id.search("cnt:") == -1)
         id = "cnt:" + id;
       }

       var **** = document.main_form.elements["KEEP.the_notify_list"].value;
       // do not allow dupes
       if (****.search(id) != -1)
        return false;

       var new_opt = new Option(name, id);
       var new_idx;
       if (document.main_form.notify_list.options.length)
        new_idx = document.main_form.notify_list.options.length;
       else
        new_idx = 0;
       document.main_form.notify_list.options[new_idx] = new_opt;

       // Keep a space-sep list reflecting the notify list.
       // This is passed back to the webengine for processing.
       document.main_form.elements["KEEP.the_notify_list"].value += id + " ";
       return true;
      }
      return true;
     }
     
     // Add combo name/persid value to recipients list
     // Return false if item is already on the list
     function add_to_cc_list(name, id, smtp) {
      if (id != "" && name != "") {
       if (smtp) {
        if (id.search("smtp:") == -1)
         id="smtp:" + id;
       }
       else {
        if (id.search("cnt:") == -1)
         id = "cnt:" + id;
       }

       var **** = document.main_form.elements["KEEP.the_notify_cc_list"].value;
       // do not allow dupes
       if (****.search(id) != -1)
        return false;

       var new_opt = new Option(name, id);
       var new_idx;
       if (document.main_form.notify_cc_list.options.length)
        new_idx = document.main_form.notify_cc_list.options.length;
       else
        new_idx = 0;
       document.main_form.notify_cc_list.options[new_idx] = new_opt;

       // Keep a space-sep list reflecting the notify  CC list.
       // This is passed back to the webengine for processing.
       document.main_form.elements["KEEP.the_notify_cc_list"].value += id + " ";
       return true;
      }
      return true;
     }

     function sort_options(sel) {
      if (sel.options.length <= 1)
       return;

      var arrOptions = new Array();
      for (var i = 0; i < sel.options.length; i++) {
       arrOptions[i] = sel[i].text + "&&&" + sel[i].value;
      }

      arrOptions.sort(sortSDLexical);

      for (var i = 0; i < sel.options.length; i++) {
       var arrItem = arrOptions[i].split("&&&");
       sel.options[i].text = arrItem[0];
       sel.options[i].value = arrItem[1];
      }
     }

     var ignore_click = false; // flag used to ignore click on Lookup link while focus was on Contact textfield (i.e. avoid double execution)
     var clicked_add = false; // flag used to delay the execution of the Add Contact button while focus was on Contact textfield (i.e. wait for autofill)
     var autofill_in_progress = false; // flag used to check if the backfill is coming from an autofill or the list screen

     // When Notify button is clicked, verify supports_smtp for Preferred Method
     function verify_notify() {
      var selmethod = document.main_form.elements["KEEP.pref_method"].value;
      var **** = document.main_form.elements["KEEP.the_notify_list"].value;
      document.main_form.elements["SET.new_attmnt_wc"].value = new_attmnt_wc;

      if ((****.search(/smtp:/) != -1) && (selmethod == "" || arrMethods[selmethod] == "0"))
       alertmsg("Require_Method_Supports_SMTP");
      else{
       if(isEmailIDExist(document.main_form.elements["notify_list"])){
        if(cfgEmailToCcList == "yes" && !isEmailIDExist(document.main_form.elements["notify_cc_list"])){
         return;
        }    
        detailSave();
       }   
      }
     }
    </script>
    <script type="text/javascript" src="$CAisd/scripts/sitemods.js"></script>
    </head>
    <body onunload="unload_check()" onload="initNames()" class="editform">
    <PDM_INCLUDE FILE=std_body.htmpl filename="">
    <script type="text/javascript">
    ahdframeset.top_splash.next_persid = "$args.persistent_id";
    <PDM_MACRO NAME=dtlForm  button=false>
    <PDM_MACRO NAME=btnStartRow>
    <PDM_MACRO NAME=button caption="Notify[!n]" hotkey_name="Notify[!n]" id="btn001" width=120
        func="verify_notify()">
    <PDM_MACRO NAME=button caption="Cancel[n]" hotkey_name="Cancel[n]" id="btncncl" btnType="negative" width=120
        func="cancel_update('$prop.factory',${args.id:0},'show_main_detail.htmpl')">
    <PDM_MACRO NAME=button caption="Clear Text" hotkey_name="Clear Text" id="CLEAR_TEXT" width=120
        func="clear_msg()">
    <PDM_MACRO NAME=btnEndRow>
    <PDM_MACRO NAME=dtlStart>
    </script>
    <input type="hidden" name=HTMPL value='show_main_detail.htmpl'>
    <input type="hidden" name=KEEP.IsModified value='1'>
    <input type="hidden" name=FACTORY value=$prop.factory>
    <PDM_IF "$prop.factory" == "chg">
    <input type="hidden" name=SET.chgalg.change_id value=$args.chgalg.change_id>
    <input type="hidden" name=SET.chgalg.analyst value=$cst.id>
    <PDM_ELIF "$args.factory" == "iss">
    <input type="hidden" name=SET.issalg.issue_id value=$args.issalg.issue_id>
    <input type="hidden" name=SET.issalg.analyst value=$cst.id>
    <PDM_ELSE>
    <input type="hidden" name=SET.alg.call_req_id value=$args.alg.call_req_id>
    <input type="hidden" name=SET.alg.analyst value=$cst.id>
    </PDM_IF>
    <input type="hidden" name="KEEP.the_notify_list" value="">
    <input type="hidden" name="KEEP.the_notify_cc_list" value="">
    <input type="hidden" name="SET.new_attmnt_wc" value="">
    <script type="text/javascript">
    var txt = '<PDM_FMT ESC_STYLE=JS2>$args.KEEP.initial_msgtxt</PDM_FMT>';
    txt = txt.replace(/%22/g,"&quot;");
    document.write('<input type="hidden" name=initial_msgtxt value="' + nx_unescape(txt) + '">');
    document.writeln('<center><br><table cellspacing=0 width=90% SUMMARY="' + form_title + '">');
    </script>

    <tr>
     <PDM_IF "$env.NX_MAIL_SHOW_TO_CC_LIST" == "Yes">
     <th width=30% class="detailro" align="center">Add Recipients</th>
     <td width=10%>&#160;</td>
     <PDM_IF "$SESSION.usingScreenReader" == "1">
     <th width=30% class='detailro requiredlabeltext gn_attribute_header_background' align="center">To Recipients (required)<br><span id="counter"></span></th>
     <PDM_ELSE>
     <th width=30% class='detailro requiredlabeltext gn_attribute_header_background' align="center">To Recipients *<br><span id="counter"></span></th>
     </PDM_IF>
     <th width=30% class='detailro requiredlabeltext gn_attribute_header_background' align="center">Cc Recipients<br><span id="counter_cc"></span></th>
     <PDM_ELSE>
     <th width=45% class="detailro" align="center">Add Recipients</th>
     <td width=10%>&#160;</td>
     <PDM_IF "$SESSION.usingScreenReader" == "1">
     <th width=45% class='detailro requiredlabeltext gn_attribute_header_background' align="center">To Recipients (required)<br><span id="counter"></span></th>
     <PDM_ELSE>
     <th width=45% class='detailro requiredlabeltext gn_attribute_header_background' align="center">To Recipients *<br><span id="counter"></span></th>
     </PDM_IF>
     </PDM_IF>
    </tr>
    <tr>
    <td class=multi_list_selection valign="top">
    <table>
    <tr>
     <th align="center" valign="baseline" class="labeltext">Available Recipients</th>
    </tr>

    <script>
    // Create Available Recipients list
    document.writeln("<tr><td align='center'>");
    document.writeln("<select multiple='multiple' name=lhs size=10 tabindex=100 title='Available Recipients'" +
                     " onfocus=\"this.className='focusField'\"" +
                     " onblur=\"this.className=''\">");

    var qp_labels = nx_unescape('<PDM_FMT ESC_STYLE=JS2>$args.KEEP.qp_labels</PDM_FMT>');
    var qp_persids = '<PDM_FMT ESC_STYLE=JS2>$args.KEEP.qp_persids</PDM_FMT>';
    var qp_names = nx_unescape('<PDM_FMT ESC_STYLE=JS2>$args.KEEP.qp_names</PDM_FMT>');
    qp_labels = ltrim(rtrim(qp_labels));
    qp_persids = ltrim(rtrim(qp_persids));
    qp_names = ltrim(rtrim(qp_names));
    var arr_labels = qp_labels.split("::");
    var arr_persids = qp_persids.split("::");
    var arr_names = qp_names.split("::");
    var stake_index = -1;

    for ( var i = 0; i < arr_names.length; i++) {
     if (i == 0)
      document.write("<option selected='selected' value='" + arr_persids[i] + "'>");
     else
      document.write("<option value='" + arr_persids[i] + "'>");
     if (arr_labels[i].match(/^\[.+\]$/)) { // contact object
      if (arr_labels[i] == "[\$%USP_STAKEHOLDERS_LIST%]") {
       document.writeln("[Stakeholders List]</option>");
       stake_index = i;
      }
      else if (arr_persids[i].match(/##/)) { // multiple entries
       document.writeln(arr_labels[i] + "</option>");
      }
      else
       document.writeln(arr_labels[i] + " -- " + arr_names[i] + "</option>");
     }
     else // contact record
      document.writeln(arr_labels[i] + "</option>");
    }

    document.writeln("</select></td></tr><tr><td align=\"right\">");
    <PDM_MACRO NAME=button caption="Add To Recipients[!ar]" hotkey_name="Add To Recipients[!ar]" id="btn003" width=0
        Tooltip="Add to To selection"
        func="addEntries(1)">
     document.writeln("</td>");

    <PDM_IF "$env.NX_MAIL_SHOW_TO_CC_LIST" == "Yes">
    document.writeln("<td>");
    <PDM_MACRO NAME=button caption="Add Cc Recipients[!ar]" hotkey_name="Add Cc Recipients[!ar]" id="btn033" width=0
        Tooltip="Add to Cc selection"
        func="addEntries(11) ">
    document.writeln("</td>");
    </PDM_IF>
    document.writeln("</tr>");

    // Begin Add Contact lookup and button.
    document.writeln("<tr>");
    document.writeln("<td align=\"left\">");
    <PDM_MACRO NAME=dtlStartRow>
    <PDM_MACRO NAME=dtlLookup hdr="Contact" attr=recip size=30>
    <PDM_MACRO NAME=dtlEndTable>
    document.writeln("</td>");
    document.writeln("</tr>");
    document.writeln("<tr>");
    document.writeln("<td align=\"right\">");
    <PDM_MACRO NAME=button caption="Add To Contact" hotkey_name="Add To Contact" id="btn004" width=0
        Tooltip="Add to To selection"
        func="addEntries(2)">
    document.writeln("</td>");
    <PDM_IF "$env.NX_MAIL_SHOW_TO_CC_LIST" == "Yes">
    document.writeln("<td>");
    <PDM_MACRO NAME=button caption="Add Cc Contact" hotkey_name="Add Cc Contact" id="btn044" width=0
        Tooltip="Add to Cc selection"
        func="addEntries(22)">
    document.writeln("</td>");
    </PDM_IF>
    document.writeln("</tr>");
    // End Add Contact lookup and button.
    </script>

    <PDM_IF "$env.NX_NOTIFICATION_ALLOW_TEMP_ADDRESS" == "Yes">
    <tr><td class="labeltext">&#160;</td></tr>
    <tr>
     <td class="labeltext" align="left" valign="baseline"><B>Email address:</B>(separated by ;)</td>
    </tr>
    <tr valign="bottom">
     <td align="left">
      <input type=TEXT name=selemail size=30 onblur="return detailBlur(this);" onfocus="return detailFocus(this);" tabindex=100>
     </td>
    </tr>
    <tr>
     <td align="right">
      <script>
    <PDM_MACRO NAME=button caption="Add To Email" hotkey_name="Add To Email" id="btn005" width=0
        Tooltip="Add to To selection"
        func="addEntries(3)">
      </script>
     </td>
    <PDM_IF "$env.NX_MAIL_SHOW_TO_CC_LIST" == "Yes">
     <td align="right">
      <script>
    <PDM_MACRO NAME=button caption="Add Cc Email" hotkey_name="Add Cc Email" id="btn055" width=0
        Tooltip="Add to Cc selection"
        func="addEntries(33)">
      </script>
     </td>
    </PDM_IF>
    </tr>
    </PDM_IF>
    </table> <!-- End left table side -->
    </td> <!-- End left side -->

    <td> <!-- middle column empty -->
    </td>

    <td class=multi_list_selection align="center" valign="top">
    <table>
    <tr>
     <script>detailRowHdr("Selected Recipients");</script>
    </tr>
     <script>
     // Create Recipients list
     var title_str = 'Selected Recipients';
     if (ahdtop.cstUsingScreenReader)
     {
      title_str = "To Recipients (required)";
     }
     document.writeln("<tr><td align='center'>");
     document.writeln("<select" + detailNextID() +
          " name=notify_list multiple='multiple' size=10 title='" + title_str + "'" +
          " onfocus=\"this.className='focusField'\"" +
          " onblur=\"this.className=''\"></select>");
     detailSetValidate("Recipients", true);
     document.writeln("</td></tr>");
     document.writeln("<tr><td class='labeltext'>&#160;</td></tr>");
     document.writeln("<tr><td align='center'>");
    <PDM_MACRO NAME=button caption="Remove To" hotkey_name="Remove To" id="REMOVE_RECIPIENT" width=0
        Tooltip="Remove from To selection"
        func="remove_cnt()">
     document.writeln("</td></tr>");
     </script>
    </table>
    </td> <!-- End To side -->
    <PDM_IF "$env.NX_MAIL_SHOW_TO_CC_LIST" == "Yes">
    <td class=multi_list_selection align="center" valign="top">
    <table>
    <tr>
     <script>detailRowHdr("Selected Recipients");</script>
    </tr>
     <script>
     // Create Recipients list
     var title_str = 'Selected Recipients';
     if (ahdtop.cstUsingScreenReader)
     {
      title_str = 'Cc Recipients';
     }
     document.writeln("<tr><td align='center'>");
     document.writeln("<select" + detailNextID() +
          " name=notify_cc_list multiple='multiple' size=10 title='" + title_str + "'" +
          " onfocus=\"this.className='focusField'\"" +
          " onblur=\"this.className=''\"></select>");
     detailSetValidate("Recipients", false);
     document.writeln("</td></tr>");
     document.writeln("<tr><td class='labeltext'>&#160;</td></tr>");
     document.writeln("<tr><td align='center'>");
    <PDM_MACRO NAME=button caption="Remove Cc" hotkey_name="Remove Cc" id="REMOVE_CC_RECIPIENT" width=0
        Tooltip="Remove from Cc selection"
        func="remove_cnt_cc()">
     document.writeln("</td></tr>");
     </script>
    </table>
    </td> <!-- End CC side -->
    </PDM_IF>

    </tr>

    </table> <!-- End global table -->
    <br>

    <script type="text/javascript">
    detailStartRow("");
    detailDropdown("Urgency", "KEEP.urg","noturg", 1, 20,
                   false, "",
                   <PDM_IF "$args.KEEP.initial_urg" != "">
                    "$args.KEEP.initial_urg"
                    <PDM_ELSE>
                    "2"
                    </PDM_IF>, "no", "", "",
                   "", "", "no", "","",""
    <PDM_LIST PREFIX=list WHERE=" " FACTORY=noturg>
    <PDM_FMT PAD=NO ESC_STYLE=C>,"$list.COMMON_NAME","$list.REL_ATTR"</PDM_FMT></PDM_LIST>);
    detailDropdown("Preferred Method", "KEEP.pref_method","cmth", 1, 20,
                   false, "", "1800", "", "", "",
                   "", "", false, "","",""
    <PDM_IF "$env.NX_XMATTERS_URL" == "">
    <PDM_LIST PREFIX=list WHERE="sym not like 'xMatters%'" FACTORY=cmth>
    <PDM_FMT PAD=NO ESC_STYLE=C>,"$list.COMMON_NAME","$list.REL_ATTR"</PDM_FMT></PDM_LIST>);
    <PDM_ELSE>
    <PDM_LIST PREFIX=list WHERE="" FACTORY=cmth>
    <PDM_FMT PAD=NO ESC_STYLE=C>,"$list.COMMON_NAME","$list.REL_ATTR"</PDM_FMT></PDM_LIST>);
    </PDM_IF>
    var arrMethods = new Array();
    <PDM_LIST PREFIX=list WHERE=" " FACTORY=cmth>
    <PDM_FMT PAD=NO ESC_STYLE=C>arrMethods["$list.REL_ATTR"] = "$list.supports_smtp";</PDM_FMT></PDM_LIST>
    <PDM_IF 1 == $prop.view_internal>
    <PDM_IF "$prop.factory" == "cr">
    <PDM_MACRO NAME=dtlCheckbox hdr="Internal?" attr=alg.internal evt="onClick=internal_click(this);detailSetCbxFlag(this)">
    <PDM_ELIF "$prop.factory" == "iss">
    <PDM_MACRO NAME=dtlCheckbox hdr="Internal?" attr=issalg.internal evt="onClick=internal_click(this);detailSetCbxFlag(this)">
    <PDM_ELSE>
    <PDM_MACRO NAME=dtlCheckbox hdr="Internal?" attr=chgalg.internal evt="onClick=internal_click(this);detailSetCbxFlag(this)">
    </PDM_IF>
    </PDM_IF>
    <PDM_MACRO NAME=dtlEndTable>

    </script>
    <script type="text/javascript">

    <PDM_MACRO NAME=dtlStartRow>
    detailTextbox("Message Title", "KEEP.msgtitle", 4, 1, 60, true, 0,
                  '<PDM_FMT ESC_STYLE=C>$args.KEEP.initial_msgtitle</PDM_FMT>');

    <PDM_MACRO NAME=dtlStartRow>    
    detailTextbox("Message Text", "KEEP.msgtxt", 4, 8, 80, true, 4000,
                  '<PDM_FMT ESC_STYLE=C>$args.KEEP.msgtxt</PDM_FMT>',"yes");

    if (resp_ids.length > 1)
    {
    <PDM_MACRO NAME=dtlStartRow>
    detailRowHdr("Personalized Response",1,0);
    docWriteln('<tr><td align="left">');
    _dtl.eventHandler = "onblur='add_response(selectedIndex)' onchange='reset_resp_on_blur_flag()'";
    docWriteln('<select' + detailNextID(true) + '>');
    for (var i = 0; i < resp_ids.length; i++)
    {
     docWrite('<option value="' + resp_ids[i] + '" ');
     docWriteln('>' + resp_sym[i] +'</option>');
    }
    docWriteln('</select></td></tr>');
    docWriteln('</center>');
    }

    </script>


    <!-- KEEP.initial_msgtxt is supplied by the webengine - it's usually the
    expanded message template as defined in the log's Activity Type -->
    <!-- ntf_names is a '::' separated list of contact names from the object's
     notify_list LREL.  ntf_ids contains the respective contact ids.  We use these
     to initally populate the recipient list -->
    <PDM_MACRO NAME=dtlEnd>
    <PDM_IF "$env.NX_MAIL_ALLOW_ATTMNTS" == "Yes" || "$env.NX_MAIL_ALLOW_ATTMNTS" == "1">
    <PDM_MACRO name=startNotebook hdr="nfro_nb">
    <PDM_IF "$args.id" == "0">
    <PDM_MACRO name=tab title="Attachments" height=300 id=attmnt src="OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=$prop.factory+PERSID=$args.persistent_id+NO_DP=yes+NO_SAVED_ATTMNT=1">
    <PDM_ELSE>
    <PDM_MACRO name=tab title="Attachments" height=300 id=attmnt src="OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=$prop.factory+PERSID=$args.persistent_id+SDBP_FLAG=1+NO_SAVED_ATTMNT=1">
    </PDM_IF>
    <PDM_MACRO name=endNotebook>
    </PDM_IF>
    <PDM_INCLUDE FILE=std_footer.htmpl>
    </body>
    </html>
    <PDM_IF 0>
    @(#)$Id: nf.htmpl HAMPI.3 2016/05/14 13:49:08 mehsu01 Exp $
    </PDM_IF>



  • 7.  Re: Manual Notify, Not Working on Server

    Posted Mar 29, 2017 02:01 PM

    Thank you very much Jordan.

     

    Besides mine being in spanish, the files looks exactly the same.



  • 8.  Re: Manual Notify, Not Working on Server

    Broadcom Employee
    Posted Mar 29, 2017 01:41 PM

    Do you have a custom version of nf.htmpl on the CA SDM server?



  • 9.  Re: Manual Notify, Not Working on Server

    Posted Mar 29, 2017 02:00 PM

    Thank you for your reply Paul.

     

    No, we haven't customize this form.

     

    I'm also looking at the REPLACED files from the cum, but they don't seem to solve the issue, which is weird.

     

    We are going to try and re-apply the language .caz for 14.1.03 and see if that works.

     

    Regards.



  • 10.  Re: Manual Notify, Not Working on Server

    Posted Mar 29, 2017 02:50 PM

    Well, it appears this is only happening when we try to use an external email address. With app contacts its working correctly.

     

    This functionality its suppose to work with the option: notification_allow_temp_address

     

    At least we are narrowing down the issue and if we come up with a solution I will post it just in case anybody else is having the same behavior.

     

    Regards.



  • 11.  Re: Manual Notify, Not Working on Server

    Broadcom Employee
    Posted Mar 29, 2017 04:01 PM

    Check to ensure that the notification_allow_temp_address option is present in the NX.ENV files on all CA SDM servers.

     

    Also confirm that the nf.htmpl file on all CA SDM servers are of the same date and time stamp.



  • 12.  Re: Manual Notify, Not Working on Server

    Posted Mar 29, 2017 07:29 PM

    Thank you again Paul.

     

    Unfortunally, the option is correctly installed and present in NX.env file.

     

    Right now this will not impact our implementation as there is no need to send manual notifications to external contacts, but we will continue looking up into this and update here as soon as we find a solution.

     

    Regards.