Notification Font style is not applying properly

Meenakshi Rajes
Tera Expert

Hi Team,

We are trying to add font to the email from email script, the font style and size which is there in the notification is not getting applied to the contents from email script, Hence we tried to give the font style and size from email script.

 

The issue is the style and size are now applicable only for the first line of the comment.

 

Can anyone please help us to resolve this issue.

 

Given the code and output below,

MeenakshiRajes_0-1723697783762.png

 

here in the first comment, the first line is following the style but not the 2nd line.

 

MeenakshiRajes_1-1723698079810.png

 

Thanks in Advance.

1 ACCEPTED SOLUTION

Hi Mark ,

Few hours back we fixed the issue by iterating the comment value, if we have more than one line.

 

str = journalEntry.value.toString().split("\n");
       for (var i = 0; i < str.length; i++) {
            template.print("<div><span style='word-wrap:break-word;display:block;font-size:10px;font-family:verdana;'>" + str[i] + "</span></div>");
        }
 

Thanks for your time.

 

View solution in original post

8 REPLIES 8

Mark Manders
Mega Patron

Is it the same in the journal entry you are copying the text from? I had this a while ago where an html field was used for comments and after pushing the 'resolved' button that text was added to the comments, including a similar line as yours from the UI action. That caused formatting issues in the email script.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

In the system the content is like the below,

 

MeenakshiRajes_0-1723716724566.png

but when coming email as i mentioned above only first line is in the correct format as per the email script

Is it also like that in the sys_journal_field table? Or does it have HTML tags in there?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

MeenakshiRajes_0-1724079699410.png