RE: [Customer Service Portal] Add comment to a ticket event
Hi Francesco,
Portals doesn't give you specific, documented events that you can tie into after a comment is submitted.
Depending on what you want to do, you could handle the "close" event of the add note dialog, like so:
$(document).ready(function() {
$('.modal-addnote').on('hidden.bs.modal', function () {
//closed
});
});
However, that event also fires if the user closes the dialog before submitting.
Another option would be to look at the "refresh" event on the timeline itself. This event is triggered after a comment is successfully added, but also when one is deleted or edited:
$('.entity-timeline').on('refresh', function() {
//refreshed
});
Be warned though - none of these events are documented, and so are subject to change without notice.
Nick