- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 11:23 PM
Hi all,
My requirement is I need to set the short description field of REQ ticket as below
Short Description - new use account created
userid - xyz
start date - xyz
I wrote the code as below
var grReq = new GlideRecord('sc_request');
grReq.get(current.request.sys_id);
//Replace your field and values as per the need.
grReq.request_state = 'Close Completed';
grReq.description = 'New User Onboarding';
grReq.short_description = 'New user account created' + '\n' + 'User Id- ' + current.variables.user_id + '\n' + 'Start Date-' + current.variables.start_date;
grReq.update();
but output is showing like this:
Short Description: New user account createdUser Id- Kar.GRStart Date-2024-01-31
Can anyone help me to correct my code to fix this issue
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 11:27 PM
Hi @Ramya SL
The Short Description is a kind of single-line text field containing more characters as compared to other single-line text fields.
You can use the description field for showing such content or else create a new short description field as Multi-line text field.
Please mark helpful if this resolves your query
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 11:35 PM
You can apply this code on Description field as it is Multi Line field. Short Description is single line field and no new line can be created on it
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 11:27 PM
Hi @Ramya SL
The Short Description is a kind of single-line text field containing more characters as compared to other single-line text fields.
You can use the description field for showing such content or else create a new short description field as Multi-line text field.
Please mark helpful if this resolves your query
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 11:35 PM
You can apply this code on Description field as it is Multi Line field. Short Description is single line field and no new line can be created on it
Regards,
Piyush Sain