I just refreshed my dev sandbox and my staging sandbox. In my dev, lightning data service is able to load the record. When I go into my staging environment, which is a partial copy sandbox, no record will load, I will get the ERRROR changeType in my handlePrescription.


<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" controller="CallerAppController">

    <aura:attribute name="prescription" type="Case" />

    <force:recordData aura:id="prescriptionEditor" 
                      recordUpdated="{!c.handlePrescription}" />



handlePrescription: function(component, event, helper) {

    console.log(component.get("v.recordId")); // returns an id
    let prescription = component.get("v.prescription");
    let eventParams = event.getParams();
    if(eventParams.changeType === "ERROR") {
    } else if(eventParams.changeType === "LOADED") {            
        //console.log("Prescription has loaded successfully.");

    } else if(eventParams.changeType === "CHANGED") {

    } else if(eventParams.changeType === "REMOVED") {
        // record is deleted
        //console.log("Record was removed.");

How can I debug this?

  • are you able to view that record in SOQL , and classic UI? – Pranay Jaiswal Jan 30 '19 at 19:12
  • Yes. I'm also able to view the record in the standard UI. – Tyler Zika Jan 30 '19 at 19:13
  • 1
    can you post the error verbatim? Also is it Spring 19 or Winter 19? – Pranay Jaiswal Jan 30 '19 at 19:13
  • Have you checked the profile permissions? – Robs Jan 30 '19 at 19:14
  • 1
    @TylerZika I tried your code and it works in Spring 19 and Winter 19, without any issue. Can you just remove the apex controller and see if it works.. – Pranay Jaiswal Jan 30 '19 at 20:00

I don't know if this is, but in refreshing my partial sandbox, I forgot to activate it. Once activated, Lightning Data Service started working...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.