How the Comments or Worknotes are updated in Portal and Native Ui ?

Ramu6
Tera Contributor

Hi All,

Actually i want to know how the Comments are updated in Portal and native Ui once we post?, where these coming from 

Ramu6_0-1704190577550.png

Ramu6_1-1704190643504.png

Please help me to understand this

Thanks

Ramu

8 REPLIES 8

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.

Anil Lande
Kilo Patron

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.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Ramu6
Tera Contributor

@Anil Lande 

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

Pankaj kr
Kilo Sage

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