We have used below lines of code to create contact record from contact related list on account. Is it possible to prepopulate accountId in contact record form?
<aura:attribute name="newContact" type="Object"/>
<aura:attribute name="simpleNewContact" type="Object"/>
<aura:attribute name="newContactError" type="String"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<force:recordData aura:id="contactRecordCreator"
layoutType="FULL"
targetRecord="{!v.newContact}"
targetFields="{!v.simpleNewContact}"
targetError="{!v.newContactError}" />
force:recordData
but you can tryLightning:RecordEditForm
newstechnologystuff.wordpress.com/2018/10/06/…