Info Message from description with Line breaks

kapilm
Kilo Contributor

I have a requirement, where I need to show the value from an description field with line breaks as an info message..

for eg:

Description:

Type: String

First Line

Second line

third line

So in info message it should retain the same format, like

First Line

Second line

third line

But, actually it is showing like this "First line second line third line"

Thanks in Advance..

10 REPLIES 10

Siddartha Gudim
Tera Guru

add '\n' to the code where ever line break is needed.



Please share the code so that I can assist you better.



Like or Mark correct based on the impact of response.


nayanawadhiya1
Kilo Sage

Hello Kapil,



description = This is line one + '\n' + 'This is line two';  



add '\n' to the code where ever line break is needed.


Thanks, its worked for me

Alexandre Sing2
Kilo Expert

I just got an issue on Service Portal where \n doesn't work in InfoMessage.