How the Comments or Worknotes are updated in Portal and Native Ui ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-02-2024 02:17 AM
Hi All,
Actually i want to know how the Comments are updated in Portal and native Ui once we post?, where these coming from
Please help me to understand this
Thanks
Ramu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-02-2024 04:48 AM
The reason for me posting the article is that the use of record watcher in the widget. The widget in the Service Portal "watches" the comments/work notes field and when it is updated it refreshed the HTML and makes it visible in the Service Portal. There is no server side functionality that are required in order for this to happen.
The activity stream is a macro in native UI, and you can have a look at the code. I do not know that macro in detail.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-02-2024 04:56 AM
Hi,
There is Ticket Conversation <"widget-ticket-conversation"> widget embedded in the form/ticket widgets.
You can check Service Portal widgets and look at the logic how these entries are fetched and updated.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-03-2024 08:29 PM
yes, this is the widget which was handling that part, but it is only for portal , it not handling the Native Ui side actually
Thanks
Ramu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-02-2024 05:00 AM
Hi Ramu,
Activities tab records the change of your record in journal form and i think it is the default behaviour of activities field to dnyamically show the change of values in the portal/native ui without refreshing the page.
You can also update worknotes from script and it will appear in the form/ portal as usual. The script is as below-
var gr= new GlideRecord('sc_cat_item');
gr.get(current.item);
ritm.work_notes=gr.description;
ritm.update();
Please mark my answer as helpful and the solution accepted if it serves the purpose.
Regards
Pankaj Kumar