+ Start a Discussion
Robert SzymczakRobert Szymczak 

force:recordData record is not creatable


I am trying to create a form that adds records to the Campaign object. I am quite new to salesforce and have been struggling with figuring out how to make this work and where my gaps in understanding are.

Here is my code so far:

The helper function is set to always return true.
When I look at this form on the home page "Record is not Createable" appears below the form, and when I click the submit button I get the error message:
"Uncaught Action failed: c:RecordFormCampaign$controller$handleSaveCampaign [Cannot read property 'recordId' of null]"

Shouldn't the added record be assigned a unique id when created? I'm not sure where to look for the specific information I need. The examples in the documentation have not helped me get past this.

Any help would be much appreciated. Thank you.

Nayana KNayana K
Hi Robert,
I have not gone through whole code. But, definitely you are missing an interface => force:hasRecordId. Please add it to RecordFormCampaign component.