Custom Portal Widget to Display Activity Log

Chris Sanford1
Kilo Guru

I am trying to build a custom activities widget that is similar to conversation but it can include resolution notes and priority changes, instead of just comments and work notes and attachments. My thought was to query the history set but this table by my understanding has to be refreshed because it does not contain the full audit history of all records.

Is there a way I could auto-refresh the history set for the ticket in the server script? I have seen on the internet examples of a 'GlideHistroySet' API but my understanding is this is not supported anymore by ServiceNow? I also understand a potential option is to also query sys_audit, but I have read that this can cause performance issues. Or is there another way to get priority change and resolution notes history in the portal activity log?

I read this post about what I am talking about: https://docs.servicenow.com/bundle/london-platform-administration/page/administer/security/concept/c...

So I guess my question is, is there a way to trigger a "generate" on a history set for a record using Javascript.

5 REPLIES 5

Allen Andreas
Administrator
Administrator

Hi,

My from research and basic understanding...is that you can clone the ticket conversations widget, using that as your template, and merely just add the fields you wish to also show on the portal. Seems pretty straight forward. Have you attempted this before going in a more complicated direction?

See 2nd to last post for a bit of what I'm talking about: https://community.servicenow.com/community?id=community_question&sys_id=29ac47e5db9cdbc01dcaf3231f96...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

So what would I click after editing the widget on page designer like they suggest?

This is what I see:

find_real_file.png

Hello,

I'm not sure what you edited...did you edit it or just clone it? If you clone it...then edited it...like the actual server side code and all that, then you just place it on whichever page you wanted the conversation/activity log to be on, for example: form, page. Then make an update to one of the fields you added in to this custom widget and see if it shows.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

So that is what I am doing. It's the "actual server side code" part I'm stuck on. What would the easier method be? I did not see any code examples in that link that work.