g_form.setLabelOf in onLOAD_record

Ni_a Sy
Tera Contributor

Here is my code:

g_form.setLabelOf('postal_address', 'Postal address');
var test = g_form.getField('postal_address');
test.help_text = 'Address to where invoice should be deliver';
 but it is not working. I need to work on a script not data dictionary.  I tried to put the code at console and found error. Please Help I just waNt to change the  LABEL NAME and the BLUE MESSAGE.

Screenshot 2023-03-01 173027.pngScreenshot 2023-03-01 173948.png

8 REPLIES 8

Ni_a Sy
Tera Contributor

Just a label of the field.

Pavankumar_1
Mega Patron

Hi @Ni_a Sy ,

Try the Show field message.

 

g_form.showFieldMsg('fieldname, 'add your message here', 'info');

 

 

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

nope. I wanted to change the field label and the blue message.

Hi @Ni_a Sy ,

May be it not possible with script. Only we can achieve on dictionary level.

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar