function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Puru GangwarPuru Gangwar 

force:recordData is not retrieving ParentId field on Case

force:recordData is returning parentId on case as null even though valid ParentId exists on the case record.
code:
 
cmp:

<force:recordData aura:id="recordLoader" 
recordId="{!v.recordId}" 
layoutType="FULL" 
fields="Id,ParentId" 
targetFields="{!v.simpleRecord}" 
targetError="{!v.recordError}" 
recordUpdated="{!c.handleRecordUpdated}"
 />


Controller file:
onInit: function (component, event) { 
console.log("oninituccess" + component.get("v.simpleRecord").ParentId); 
}, 
handleRecordUpdated: function (component, event, helper) { 
var eventParams = event.getParams(); 
if (eventParams.changeType === "LOADED") { 
helper.onInit(component, event); 
}
}

 
Puru GangwarPuru Gangwar
The control visibility was set to false on ParentId on flexipage. Non issue