1 Reply Latest reply: Apr 9, 2013 2:17 PM by 1002077 RSS

    Hyperion - Send email without attachment

    949408
      I am trying to send email when a scheduled job returns 0 records. The email will serve as an alert to the IT team to look into the job. I am using Application.ExecuteBscript() in postProcess().

      Here is the syntax I use. This works fine and am receiving emails. But in case of 0 records, I want email without any attachment, But this syntax requires an attachment.Please help me how to fix this.

      3rd parameter is the attachement type and 4th parameter is the attachment file name.

      var dtm_current = new Date(); Application.ExecuteBScript("Set BrioQuery, Mail, 'Internet Mail', emailserverwithoutquotes,'fromemailid'");
      var count =1* ActiveDocument.Sections['R-Results'].RowCount;

      Console.Writeln(count);
      if(count > 0){
      Application.ExecuteBScript("Export Section Root.'R-Results', csv, 'job_output', Silent, email, 'Testing Email action if', 'This is a test of the email action if. \n\n\n', UTF-8, To, 'tomailid'");
      }

      else{
      Application.ExecuteBScript("Export Section Root.'R-Results', csv, 'job_output', Silent, email, 'Testing Email action else', 'This is a test of the email action if record count is 0. \n\n\n', UTF-8, To, 'tomailid'");
      }

      Thanks!