Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Case Portal comments - 'Add comment' button visibility based on case status

Posted on by 20

On the Portal, there is a button called 'Add comment' to add comments by the user into the case. Once the case status is resolved, this button needs to be disabled or hidden as there is already an action button showing in the case called "Reopen Case" and we want to restrict users from using the 'Add comment' button to add comments onto resolved cases.

Can this be configured please? 

  • Verified answer
    cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Case Portal comments - 'Add comment' button visibility based on case status

    Hi Manu,

    It's glad that your problem has been solved.

    Please kindly mark as verified if you had found my answer helped, it would be greatly appreciated.

    Regards,

    Clofly

  • Suggested answer
    Manu Manuel Profile Picture
    Manu Manuel 20 on at
    RE: Case Portal comments - 'Add comment' button visibility based on case status

    Thank you very much Clofly. This works perfectly!

  • Verified answer
    cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Case Portal comments - 'Add comment' button visibility based on case status

    Hi Manu,

    We can insert custom javascript into web template: "Customer Service - Edit Case" to achieve your requirement.

    You may had noticed that this label will always change based on case status.

    pastedimage1577949662073v1.png

    This label is "label-success", which will appears when current case status equals 1.(Closed)

    So we insert our code into the snippet:

    (function ($) {
      setTimeout(function(){ 
        $('.addnote').css('display', 'none');
      }, 2000);            
    }(jQuery))

    pastedimage1577950206759v5.png

    A timer is required because our function will be executed before the "Add comment" button is rendered,

    we need wait some time to catch the element.(You might need to change it based on your portal performance)

    Now the button will be hidden if case had been closed.

    pastedimage1577950086610v4.png

    Regards,

    Clofly

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans