Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

help me mail script

Thomas98
Tera Expert

Hi,

 

Can someone please help me html mail script? 

My issue is either I'm getting the entire line in bold and if I remove the <strong> entire line unbolds. 

 

 

 

 while (gr.next()) {
        typeofuser = gr.variables.user_request.getDisplayValue();
        firstname = gr.variables.first_name;
        lastname = gr.variables.last_name;
    }
    template.print('<p>Account Type: <strong>' + typeofuser + '</strong><br />');
    template.print('Frist Name: <strong>' + firstname +'</strong><br />');
    template.print('Last Name: <strong>' + lastname +'</strong><br />');
 
 
expected result: 
Account Type: NewUser
First Name:    XXXXX
Last Name:    XXXXX
 
 
2 ACCEPTED SOLUTIONS

Jaspal Singh
Mega Patron

Hi Thomas,

Script you usiing should work. You can try below.

template.print('<p>Account Type: ');
    template.print('<strong>' + typeofuser + '</strong><br />');
    template.print('Frist Name :');
	template.print('<strong>' + firstname + '</strong><br />');
    template.print('Last Name: ');
	template.print('<strong>' + lastname + '</strong><br />');

 

View solution in original post

When in bold

JaspalSingh_0-1697899455143.png

 

 

when not in bold

JaspalSingh_1-1697899515164.png

 

 

Ensure the mailscript called is not in bold.

View solution in original post

5 REPLIES 5

Jaspal Singh
Mega Patron

Hi Thomas,

Script you usiing should work. You can try below.

template.print('<p>Account Type: ');
    template.print('<strong>' + typeofuser + '</strong><br />');
    template.print('Frist Name :');
	template.print('<strong>' + firstname + '</strong><br />');
    template.print('Last Name: ');
	template.print('<strong>' + lastname + '</strong><br />');

 

That didnt work 😞

 

var typeofuser;
    var firstname;
    var lastname;
    var gr = new GlideRecord("sc_req_item");
    gr.addQuery("request", current.sys_id);
    gr.query();
    while (gr.next()) {
        typeofuser = gr.variables.type_of_user_request.getDisplayValue();
        firstname = gr.variables.first_name;
        lastname = gr.variables.last_name;
    }
template.print('<p>Account Type: ');
    template.print('<strong>' + typeofuser + '</strong><br />');
    template.print('Frist Name :');
    template.print('<strong>' + firstname + '</strong><br />');
    template.print('Last Name: ');
    template.print('<strong>' + lastname + '</strong><br />');
})(current, template, email, email_action, event);
 
 
This is what I got
Thomas98_0-1697898884527.png

 

Strange. Can you ensure if the mailscript is not marked as bold or the notification has a bold included just before the mailscript you calling.

When in bold

JaspalSingh_0-1697899455143.png

 

 

when not in bold

JaspalSingh_1-1697899515164.png

 

 

Ensure the mailscript called is not in bold.