I was rendering the person contact details using lightning record edit form. Updating the person contact details using force:recordData lightning data service.

If i'm updating the person contact details using the saveRecord of data service, in success call back im getting the person account id instead of person contact Id.


<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:attribute name="recordError" type="String" access="public"/>
<aura:attribute name="contactInstance" type="Contact" access="public" />
<aura:attribute name="record" type="Contact" access="public"/>

<lightning:recordEditForm aura:id="submit-sobject" 
                          recordId="0034100002BTXzA" >
    <lightning:messages />                 
    <lightning:inputField fieldName="Name" onchange="{!c.bindChangedValues}" />

<force:recordData aura:id="recordHandler"
                  mode="EDIT" /> 

<lightning:button variant="brand" label="Save" title="Save" onclick="{!c.save}"/>


bindChangedValues : function(component, event, helper) {
    var targetCmp = event.getSource();        
    var contactInstance = component.get("v.contactInstance") || {};
    contactInstance[targetCmp.get("v.fieldName")] = targetCmp.get("v.value");        
    component.set("v.contactInstance", contactInstance);

save : function(component, event, helper) {
    console.log('contact Instance-->', JSON.stringify(component.get("v.contactInstance")));
        $A.getCallback(function(saveResult) {                    
            if(saveResult.state === "SUCCESS") {
                console.log('saveResulId', saveResult.recordId);


enter image description here

Is this is known issue/ behaviour or i'm missing anything here.

1 Answer 1


Person accounts are special cases. Once person account is enabled in your org, creating a person account internally creates two records (One to represent contact and one to represent associated account)

In general - Account can have multiple contacts, but for person accounts its always 1-to-1.

The behavior is described very nicely in below post:

(Person Accounts & PersonContactId - how are these related?: https://success.salesforce.com/answers?id=90630000000hsNXAAY).

Person Account Documentation

  • i agree with you person accounts are some special cases. even though if you update a person contact it should return the person contact id. If we update any person contact using apex code, it will return the only person contact id not the person account id. Jun 17, 2018 at 16:51

This site is temporarily in read-only mode and not accepting new answers.

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