Problem Management - Rename Label Client Scripts

hongsok
Tera Contributor

Dear all,

 

Recently I Reverted the Problem module to the OOTB version. The OOB client script "Rename Closed fields on Load" & "Rename Closed fields on change" seem to be not working correctly. The following fields show as capital case with underscore. I would appreciate it if you could provide me with a clue or guidance on how to fix it.

  • CANCELED_DATE
  • COMPLETED_DATE
  • RISK_ACCEPTED_DATE

 

Regards,

Hong

1 ACCEPTED SOLUTION

AJ M
Mega Sage
These are being set by changeLabel('closed_at', getMessage("CANCELED_DATE"));
 The other two should be similar in the script. If it cannot find a Message for CANCELED_DATE, it will just return that value. 
System Localization > Messages should have this information. If it does not, that's why you're getting the raw values.
AJM_0-1733803819076.png

 

Official Documentation

Translate a client script message

View solution in original post

3 REPLIES 3

AJ M
Mega Sage
These are being set by changeLabel('closed_at', getMessage("CANCELED_DATE"));
 The other two should be similar in the script. If it cannot find a Message for CANCELED_DATE, it will just return that value. 
System Localization > Messages should have this information. If it does not, that's why you're getting the raw values.
AJM_0-1733803819076.png

 

Official Documentation

Translate a client script message

hongsok
Tera Contributor

Hi AJ,

 

Yes, it works after I imported those from my PDI. Thanks for you help.

vishwajeet5550
Mega Guru

open  Client Scripts.

Click new to create a new Client Script

Set the table to Problem

Set the type to onLoad

Use the g_form.setLabel() method

 

var problemState = g_form.getValue('state');

IF (problemState == '1') {

 g_form.setLabel('short_description', 'New Problem Description');

}

ELSE {

g_form.setLabel('short_description', 'Problem Description');

}