Prevent comments on Agent Desktop feed posts.

Is it possible to disable or remove the comment button/icon on Agent Desktop feed posts or prevent comments using permissions or a system setting?

Like 0

Like

6 comments

Hello Gareth,

 

Could you please elaborate on the task you are trying to achieve?

Additionally, could you please provide screenshots of the section you want to change?

 

Thank you,

Artem.

Artem,

 

The task I have been asked to do is to prevent users from adding comments to posts on the feed of the Agent Desktop.  Is it possible to remove or disable the comment button (see image)?  Thanks,

 

Gareth Osler,

One quick and easy way is to just hide the comments button with CSS. Add css to the agent desktop page - See https://customerfx.com/article/adding-custom-css-style-sheets-in-bpmonl…

Then add this CSS to hide the comments button:

#OperatorSingleWindowPageContainer [data-item-marker="SocialFeedContainer"] [data-item-marker="Comments"] {
    display: none;
}

Ryan

OperatorSingleWindowPage Agent desktop page already has CSS defined, namely OperatorSingleWindowCSS Agent desktop: CSS styles, which cannot be edited.

 

So I created another CSS file UsrOperatorSingleWindowCSS2 and put the CSS to hide comments in it.

 

The Agent desktop page isn't a normal section, it's not possible to open the section wizard, so I created a Replacing view model as follows:

Unsurprisingly the above did not work!  

 

Any suggestions would be appreciated.

 

Thanks,

Gareth Osler,

It does not appear as though you've created the replacing client view correctly. The code you shared shows "UsrClientUnit_fdb86f8", not "OperatorSingleWindowPage". This needs to change to match the view model being replaced. 

Ryan

Thanks for pointing out the mistake (you shouldn't have had to!).

 

For reference of anyone travelling down this road in the future the CSS/LESS to remove both comments and likes:

#OperatorSingleWindowPageContainer [data-item-marker="SocialFeedContainer"] [data-item-marker="Comments"] {
    display: none;
}
#OperatorSingleWindowPageContainer [data-item-marker="SocialFeedContainer"] [data-item-marker="UsersWhoLikeItButton"] {
    display: none;
}
#OperatorSingleWindowPageContainer [data-item-marker="SocialFeedContainer"] [data-item-marker="Like"] {
    display: none;
}

 

Show all comments