web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

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

(0) ShareShare
ReportReport
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? 

I have the same question (0)
  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    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

  • Suggested answer
    Manu Manuel Profile Picture
    20 on at

    Thank you very much Clofly. This works perfectly!

  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 81 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans