Table format in email notification Scripts

Shankar Manohar
Mega Guru

      Dear All,

                          I am trying to create the change field values in my email body in a table format. I have created the fields value in paragraph mode with a line break. However, I need to incorporate them in a table format.

Attaching the screenshot how I want the email body to look like.

$3B317A2A91E7A99D.jpg

Any Suggestions would be helpful.

Thanks

Shan

1 ACCEPTED SOLUTION

Hi All,



I got the output that is required. Able to create the table using the html tags in Emails Scripts. Please let me know if any one is having the similar requirement.



Thanks


Shan


View solution in original post

4 REPLIES 4

Community Alums
Not applicable

Hi Shankar,



Create a new notification or updatenotification as Rich HTML. There you can find an option to use tables with tr and td.



find_real_file.png


Hi Hardik,



      That is the current Set up. I have to remove the body completely and send it from the email script. Because I have to print two different bodies based on the conditions. Using the table like above in the body won't help me.



So I am customizing the email scripts with two bodies and print it when one condition matches. So I have to use the table format in the email script itself.



Thanks


Shan


Hi All,



I got the output that is required. Able to create the table using the html tags in Emails Scripts. Please let me know if any one is having the similar requirement.



Thanks


Shan


Hi ,

I have same requirement. I am fetching child records ;

Script:

template.print("Summary of Order Lines:<br />"); 
var gr = new GlideRecord("x_hclte_zekelman_c_order_line");
gr.addQuery("u_reference_1", current.sys_id);
gr.query();
while(gr.next()) {
  template.print("Order Line :" + gr.number + " Description :  " + gr.description + " Category:  "   + "Quantity:  " + gr.quatity+ " each <br/>");
}
          // Add your code here

 

Could u plz help on this.