- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 11:13 PM
Hi all,
how can we add the resolution code in to the comments, so that the creater can the the resolution code inforation in the comments?
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:41 AM
Hi @BuriB ,
can you try as below
(function executeRule(current, previous /*null when async*/) {
current.comments = "Resolution code is: " + current.getDisplayValue('resolution_code') + "---->"+ "Resolution Notes is: "+current.getDisplayValue('close_notes');
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:46 AM
Hello @BuriB
Since the resolution code is a choice field, therefore number you see is the backend value. To get the display value use getDisplayValue() method.
Here is the updated script:
(function executeRule(current, previous /*null when async*/) {
var resolutionCodeLabel = current.resolution_code.getDisplayValue(); // Get the label of resolution_code
current.comments = "Resolution code is: " + resolutionCodeLabel + " ----> " + "Resolution Notes is: " + current.close_notes;
})(current, previous);
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 11:36 PM - edited 01-02-2025 11:37 PM
hi @BuriB ,
If you're wanting to post the resolution notes to the additional comments for the customer to see, you can add a BR to complete this.
When: Before
Filter: State changes to Resolved
Script:
(function executeRule(current, previous /*null when async*/) {
current.comments = "Resolution code is" + current.close_code + "-->"+ "Resolution Notes "+current.close_notes;
})(current, previous);
Mark it as helpful, if it fulfills your requirement.
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:37 AM
Hi @Bhavya11
it looks almost good. I triesd the following:
Resolution code is: 31---->Resolution Notes is: Test 7
How i can change to label?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:41 AM
Hi @BuriB ,
can you try as below
(function executeRule(current, previous /*null when async*/) {
current.comments = "Resolution code is: " + current.getDisplayValue('resolution_code') + "---->"+ "Resolution Notes is: "+current.getDisplayValue('close_notes');
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:09 AM
Hello @Bhavya11
The Possible way is by using Business Rule.
Trigger Condition will be :
when to run :
After/Update
Resolution Code Changes
script
current.comments=current.close_code;
current.setWorkflow(false);
current.update();
Thanks and Regards
Gaurav Shirsat