- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 01:24 AM
Hi Experts,
Need your help in formatting my mail script font/style to be consistent with the Notification we have.
We have a notification which per checking is using Arial font, size 12. This notification is calling a mail script.
Now, when the notification is viewed they have different Font and Style. I have added below line of code to my mail script but not helping. template.print('<p><font size="3" color="#000000" face="arial">');
Please help!
Mail Script
Notification Preview:
HTML source code of Notification
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;">Hi,</span></p>
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;">An Asset Transfer Request has been approved and the below task is required to be completed: </span></p>
<p> </p>
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;"><strong>${number} - ${short_description}</strong></span></p>
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;">Opened by: ${opened_by} on ${opened_at}</span></p>
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;">Description: </span></p>
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;">${description}</span></p>
<p> </p>
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;">Request: ${request_item.request.number} - ${request_item.request.short_description}</span></p>
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;">Request item: ${request_item.number} - ${request_item.cat_item}</span></p>
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;">Request opened: ${request_item.request.opened_at} </span></p>
<p> </p>
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><span style="font-family: arial, helvetica, sans-serif; color: #000000;">${mail_script:task_asset_transfer}</span></span></p>
<p> </p>
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">${mailto:mailto.close_task}</span></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div align="center">${mail_script:ah_item_view_sc_task}</div>
<p> </p>
<p> </p>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 03:13 AM
Hello
try with this script i think it applied but we did not apply the correct CSS try below code
template.print('<p style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;>")
template.print("Transfer To Location: " + item.variable_pool.transfer_to_location.getDisplayValue());
template.print( "<br /></p>");
template.print('<style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;">')
template.print("Transfer To Business Unit: " + item.variable_pool.transfer_to_bu.getDisplayValue());
template.print( "<br /></p>");
template.print('<p style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000;">')
template.print( "Transfer To Cost Centre: "+ item.variable_pool.transfer_to_cost_center.getDisplayValue());
template.print( "<br /></p>");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 01:33 AM
Hello
Can you please try replacing your if loop lines like below
template.print('<p><font size="3" color="#000000" face="arial">');
template.print("<p style='font-size=3 ;color=#000000; face=arial'>Transfer To Location: " + item.variable_pool.transfer_to_location.getDisplayValue() + "<br /></p>");
template.print("<p style='font-size=3 ;color=#000000; face=arial'>Transfer To Business Unit: " + item.variable_pool.transfer_to_bu.getDisplayValue() + "<br /></p>");
template.print( "<p style='font-size=3 ;color=#000000; face=arial'>Transfer To Cost Centre: "+ item.variable_pool.transfer_to_cost_center.getDisplayValue()+"</br ></p>");
Please mark my answer correct if it works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 02:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 02:36 AM
hello
see below script and replace once and try
template.print('<p style="font-size:3px ;color:#000000; face:arial">')
template.print("Transfer To Location: " + item.variable_pool.transfer_to_location.getDisplayValue());
template.print( "<br /></p>");
template.print('<p style="font-size:3px ;color:#000000; face:arial">')
template.print("Transfer To Business Unit: " + item.variable_pool.transfer_to_bu.getDisplayValue());
template.print( "<br /></p>");
template.print('<p style="font-size:3px ;color:#000000; face:arial">')
template.print( "Transfer To Cost Centre: "+ item.variable_pool.transfer_to_cost_center.getDisplayValue());
template.print( "<br /></p>");
Mark it correct if it solves the issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 03:00 AM