1

I have created a Customer Community. In there is a section where they can update their "skills", which behind the scenes is a Contact_Skill__c custom object holding that data.

I'm running into an issue where the Community user doesn't have permissions to delete the records in that object. I have checked/completed the following:

  1. Contact_Skill__c has public read/write sharing settings.
  2. Verified Community Sharing Set (may not be needed, but not available since public read/write).
  3. Granted Read/Updated/Delete access to the Community user's profile for that object.

However, despite taking these steps, I'm still unable to delete these records using Apex. In my Apex code, I even check if the user has write and delete access before attempting to delete and according to the checks (DescribeSObjectResult) the user has that access.

The only thing I can thing I can think of is that Customer Community license doesn't allow deleting custom records. Is my assumption correct (hopefully not) or should I be able to delete custom object records as a Customer Community license user?

If I can delete custom object records, what else should I check to make sure my Community user has access to the delete the object?

Here's the error message (ID omitted, but points to the record I'm trying to delete):

System.DmlException: Delete failed. First exception on row 0 with id {omitted}; first error: INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id: []

Here's the CRUD settings for the Customer Community profile:

enter image description here

Here's the Sharing Setting for the Contact Skill custom object:

enter image description here

I also tried setting the Sharing settings to Public Read only, then creating a Community Sharing set, but still could not delete:

enter image description here

I'm attempting to delete the Contact_Skill__c records using APEX:

// get current contact skills
List<Contact_Skill__c> contactSkills = [select Id from Contact_Skill__c where Contact__c = :contactId];
// remove them
delete contactSkills;

Here's the controller signature:

public with sharing class InspectorCommunitiesController

This problem may be related to this problem.

1
  • is your query coming back with an/ list of ID(s) ? also include the contact__c in your query to show if the result set has contact skill with a contact associated with it. Even better system debug and make sure the contactId is same as the contact__c
    – Rao
    Commented Mar 30, 2018 at 20:57

1 Answer 1

2

We have a customer community and users with the CC Plus as well as customer community login license are able to delete custom object records as long as their profile allows them do.

I dont think its a restriction of the license. There are restrictions for vanilla objects like account,contact for which these users cannot delete documented here.

But custom objects should be deleteable.

8
  • Thanks @RedDevil, what else should I check to make sure my Community user has access to the delete the object? Commented Mar 12, 2018 at 17:37
  • @SwisherSweet, can you add the error message to the question?.
    – RedDevil
    Commented Mar 12, 2018 at 17:37
  • @SwisherSweet,error says insufficient or read only. Are you sure the object has public read write settings in OWD?
    – RedDevil
    Commented Mar 12, 2018 at 17:43
  • Yes OWD has public read/write and profile has create/read/edit/delete. Commented Mar 12, 2018 at 18:12
  • do you have any other ideas why delete is not working despite confirming those things you suggested? Commented Mar 19, 2018 at 14:32

You must log in to answer this question.

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