I'm struggling to load my custom object record using LDS and i got a object privilegies error :

You don't have access to this record. Ask your administrator for help or to request access.

I've checked :

  • User profile : OK (as System Administrator, i'm the custom object owner)
  • Sharing Settings: No sharing Settings configured
  • Roles: No roles configured

I"ve full access (READ/WRITE) to the object/field/record according to my user profile.

Below is myComponent.cmp code

<aura:component implements="lightning:actionOverride,force:hasRecordId,
<aura:attribute name="record" 
                description="The record object to be displayed"/>
<aura:attribute name="simpleRecord" 
                description="A simplified view record object to be displayed"/>
<aura:attribute name="recordError"
                description="An error message bound to force:recordData"/>

<force:recordData aura:id="newRecordCreator"

<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

<!-- Display Lightning Data Service errors -->
<aura:if isTrue="{!not(empty(v.recordError))}">
    <div class="recordError">

and here myComponentController.js

doInit : function(component, event, helper) {
    // Prepare a new record from template
        "TEST_ME__c", // sObject type (entityAPIName)
        null,      // recordTypeId
        false,     // skip cache?
        $A.getCallback(function() {
            var rec = component.get("v.record");
            var error = component.get("v.recordError");
            if(error || (rec === null)) {
                console.log("Error initializing record template: " + error);
            else {
                console.log("Record template initialized: " + rec.sobjectType);

Huge thanks for helping me with this issue!

PS: When i try loading a Standard object it works...

  • When you mention READ/WRITE - does WRITE include CREATE permissions as well or is it restricted only to EDIT? Can you verify it once on the profile you are trying with?
    – Jayant Das
    Jul 15, 2018 at 19:10

1 Answer 1


Finally i've found out what was missing. I just added the namespace to my custom object definition in the getNewRecord() method as below and it works :

  • myNamespace__TEST_ME__c

Maybe because i'm working on a managed package, i had to specify the namespace.

Anyway the error message from LDS component was not really specific in my case.

You must log in to answer this question.

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