Not updating the worknotes label in the updated records in the incident form
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 08:52 PM
Hi ,
On load client script not working in updated records but it is working in new records
function onLoad() {
//Type appropriate comment here, and begin script below
//Show a Placeholder in a worknotes field
let workNotes = g_form.getControl("work_notes");
if (workNotes) {
workNotes.placeholder = 'Work notes are visible for operators in SM.now and connected ticket tools, but not in the ESC portal';
}
//Show a Placeholder in a comments field
let comments = g_form.getControl("comments");
if (comments) {
comments.placeholder = 'Comments are visible for users in the ESC portal and operators in SM.now, but not in connected ticket tools';
}
let labelText = g_form.getLabelOf('comments');
if (labelText.substring(labelText.length - 1) == ':')
labelText = labelText.substring(0, labelText.length - 1);
labelText += new GwtMessage().getMessage(' (ESC portal visible)');
g_form.setLabelOf('comments', labelText);
}
for new Record
for old Record
Can anyone help me
Thanks
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 10:51 PM
Try to use this just to debug the issue and see if it work on old existing records by this
if(!g_form.isNewRecord()){
}
If my answer helped you in any way, then mark it as helpful or correct. This will help others finding a solution.
Kindly mark it correct and helpful if it is applicable.
Thanks,
Raj
Thanks,
Raj
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 10:59 PM
@raj chavan : it is not working