2

Im using standard calendar in lightning community and already remove the Edit Event permission from the logged user

It is possible to remove the new event button? (Im using standard calendar in lightning community and already remove the Edit Event permission from the logged user)

I want this because New event action CANNOT be override IN COMMUNITIES by a lightning component.

Thanks!

2 Answers 2

2

Because you are in the community, yes you can do this by adding a CSS override.

You can edit the community CSS overrides here: enter image description here

You will then need to examine the html of the edit button, but it's going to be very similar to this:

<ul class="branding-actions slds-button-group oneActionsRibbon forceActionsContainer" >
  <li class="slds-button slds-button--neutral slds-truncate" >
    <a href="javascript:void(0);" title="New Event" 
      class="forceActionLink" role="button">
      <div class="slds-truncate" title="New Event" >New Event</div>
    </a></li>
</ul>

(Right click on the button and choose 'inspect' to see the html and css structure)

In the Edit CSS area you will need to target the css + html structure of the button.

Something like this:

.branding-actions.slds-button-group.oneActionsRibbon.forceActionsContainer .forceActionLink[title="New Event"]{
  display:none;
}

Hit save, publish the community and it should work.

1
1

In the year since this answer was written, Salesforce has changed the HTML.

So, the CSS I came up with that solves this requirement today is:

.slds-button.slds-button_neutral.new-event-button {display:none}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .