- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 10:38 AM
Hi
I need to populate the closed notes field for closed incident in service portal.Could some one please help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 11:35 PM
Hello,
Form layout or view won't help here because in SP, "Ticket Fields" widget can only show 'number,state,priority,sys_created_on' fields but if you want close notes field then you need to clone the widget and have to add code for close note.
I hope you are looking for below output :
If yes, you can follow below steps :
1. From left navigation. Select "Service Portal Configuration âžš"
2. New tab should open and then select "Widget Editor"
3. Select "Ticket Fields" in Edit an existing widget list.
4. Select "Clone "Ticket Fields" option.
5. Provide name/id for your new custom widget.
6. You need to make changes in "HTML Template" and in "Server Script" (script changes are selected as below):
here is the script which you can copy:
HTML Template:
<div ng-if="data.close_notes != '' " ng-init="variable_toggle=true">
<h4 ng-click="variable_toggle = !variable_toggle" style="cursor: pointer;">
<span style="font-size: 12px;" class="glyphicon"
ng-class="{'glyphicon-chevron-down': !variable_toggle, 'glyphicon-chevron-up': variable_toggle}"></span>
${Close Notes}
</h4>
<div ng-if="variable_toggle">
<hr>
<div class="m-b break-word">
<div>{{data.close_notes}}</div>
</div>
</div>
</div>
Server Side Script:
data.close_notes = '';
data.close_notes = $sp.getFields(gr, 'close_notes');
if(data.close_notes != '') {
data.close_notes = data.close_notes[0].display_value;
}
7. You can replace OOB "Ticket Fields" widget from ticket page with your custom widget.
7.1 - Goto "Service Portal Configuration" from left navigation and select "Page Editor".
7.2 - Select "Ticket" page from the search list.
7.3 - Select "Instance 2" and update Ticket Fields widget with new widget :
8. Now all required changes are complete.
Note: ticket page can be use for other tables like problem so close note will also get visible for problem tickets also if you don't want you can add condition in the server script.
if data.close_notes is empty then "Close Note" will not be visible.
Please let me know if you find any difficulties.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 10:57 AM
Hi Gomathyshankar,
From where you want to populate the closed notes,
Regards
Ujjawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 09:53 PM
Hi Ujjawal,
I just need to add the closed notes field in the closed incident in service portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 10:14 PM
Check the closed notes field is present in the form layout of the closed incident for the sp view, if not then you can add it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 10:28 PM
Hi,
From where we can check the form layout of closed incident for sp view?