Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: Email Template adds multiple html paragraph code when creating an email

$
0
0

//remove the enter which was created by system
messageBody = strReplace(messageBody, '\n', '');

messageBody = SysEmailMessage::stringExpand(messageBody, SysEmailTable::htmlEncodeParameters(_mappings));

messageBody = strReplace(messageBody, '\n', '<br>');

Based on the testing, I noticed that, standard AX sytem will add the <br> infront each line after call strReplace

<BODY><P><FONT size=2 face=Calibri>Hi All,</FONT></P></BODY>

After call the StrReplace function :

<br><BODY><P><FONT size=2 face=Calibri>Hi All,</FONT></P></BODY>

So i try to remove the default enter before expand the mapping value. 


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>