Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

[Customer Service Portal] Add comment to a ticket event

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

is there a way to fire a javascript function after adding a new comment in the timeline on the incident page? I'm using native component and I've found there's a function called addNote() in app.bundle, I want to execute a javascript function after the comment submit.

Thanks in advance.

Greetings

*This post is locked for comments

  • Suggested answer
    Nicholas Hayduk Profile Picture
    Nicholas Hayduk 2,863 on at
    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

  • Justinjose Profile Picture
    Justinjose 2,707 on at
    RE: [Customer Service Portal] Add comment to a ticket event

    .

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans