I'm trying to update an object which is created when the init
method is called. I'm using <lightning:recordEditForm
along with <lightning:inputField
to capture the fields and map them to the record.
The form is on a Community Page so I'm confused about how to set recordId
<aura:component implements="forceCommunity:availableForAllPageTypes,force:hasRecordId"
<aura:attribute name="recordId" type="String" default="a101l0000098dUV" />
<lightning:recordEditForm recordId="{!v.recordId}" objectApiName="XXX__c">
The problem I'm having is when I remove the recordId
value from <lightning:recordEditForm
the form loads but when a value is added the form does not load.
I want to take these fields and update a record which has been created to store files which have been uploaded during the progression of the form.
Is this down to not having a record to fetch as it is part of a community page?
Can you not enter another recordId
bar the one supplied via force:hasRecordId"
?
**
I did not design this component so it could be down to some logic I have not found yet it is pretty straightforward though. Everything works a record is created but I want to update a record not create one. At the moment, I create two records one in the init
method this is the one to be updated. The other is the record the form is creating when submitted.