Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [lightning-record-form]

A lightning:recordForm component enables you to quickly create forms to add, view, or update a record. Using this component to create record forms is easier than building forms manually with lightning:recordEditForm and lightning:recordViewForm.

1
vote
0answers
14 views

recordForm error Handling

I have a recordForm like this:- <aura:attribute name="KeyDealInfoSectionfieldlist" type="String[]" default="field1__c,field2__c"/> <aura:attribute name="objectName" type="String" ...
0
votes
1answer
23 views

Lightning:recordForm custom buttons

Is it possible to include custom buttons on Lightning:RecordForm or any of its variations ? Specifically a "save and new" button. If this is not possible, should the alternative be to create a ...
0
votes
0answers
47 views

LWC record form for related fields

MY LWC looks like below import { LightningElement,api } from 'lwc'; import ENGAGE_SUBJECT_FIELD from '@salesforce/schema/Engagement__c.Subject__c'; import ENGAGE_INDUSTRY_GROUP_FIELD from '@...
0
votes
1answer
31 views

onLoad not been called in lightning:recordEditForm

I am having input fields inside my recordEditForm. When i try to run the component it's not calling the onload event handler. I don't want to put any lightning:inputField into it. Because I don't need ...
0
votes
1answer
34 views

Add look up field in lightning-record-form with on lightning web component

I want to know if there is a way to add look up field in lightning-record-form with on lightning web component. Thanks in advance.
4
votes
2answers
94 views

Specify read only fields for lightning:recordForm

On the Case object, I have a lightning component that displays only the fields of interest depending on the Status of the case. I have a separate Change_Status_To__c dependent picklist that actually ...
1
vote
0answers
23 views

Lightning:recordForm is not displaying fields as mandatory but the fields are marked as mandatory on Pagelayout

I have multiple recordTypes and multiple pagelayouts. For each record type there are specific fields marked as mandatory as per the recordType on the pagelayout but when i am using lightning:...
1
vote
2answers
356 views

How to use Lightning-Record-Form onError to display custom error message

Let's say I have a Lightning-Web-Component that uses lightning-record-form like this: <lightning-record-form record-id={recordId} object-api-name="Opportunity" fields={myFields} ...
0
votes
1answer
91 views

lightning:recordForm not displaying full error message

I am getting only the below generic error message in lightning:recordForm component. An error occurred while trying to update the record. Please try again. But I see the below error in the onerror ...
0
votes
1answer
155 views

Lightning:recordForm 's onSuccess doesn't return record ID [duplicate]

I am using the lightning:recordForm for creating the record <lightning:recordForm aura:id="recordViewForm" objectApiName="{!v.sObjectName}" ...
0
votes
0answers
94 views

Lightning:recordForm onSuccess event not returning response

I'm trying to get the response in the onSuccess callback for a lightning:recordForm save event, but it's coming up as undefined. The callback is being called, I can log to the console, but both of the ...
0
votes
1answer
170 views

What's the easiest way to write a properly working onChange handler for lightning:recordForm? [closed]

It is more question for Salesforce gurus and Lightning/Aura Components Framework developers. On my own, Lightning Framework has a lot of restrictions and sometimes it is really hard to build flexible ...
1
vote
1answer
66 views

What impact have on performance of page loading when we use multiple Lightning:RecordForm in a single component

We are using multiple lightning:recordForm in different aura:if for the different condition in a single custom Lightning Component for showing different field. Is it the best practice to use ...
0
votes
0answers
22 views

Can I assign fields to a record in a recordForm component using JavaScript? [duplicate]

Is it possible to assign a field to a record loaded with the component lightning:recordForm? Like: component.find('myform').set('v.record.Field__c', 'We were hereeee!')
5
votes
2answers
417 views

lightning:recordForm - Error when layout contains recordTypeId

I have a component that contains lightning:recordForm like so: <lightning:recordForm recordId="001f200001Zg2uYAAR" objectApiName="Account" layoutType="...
1
vote
0answers
149 views

lightning:recordForm - New Record doesn't render Compact

I have a lightning recordForm defined as: <lightning:recordForm objectApiName="Account" layoutType="Compact" columns="3" ...
2
votes
1answer
249 views

Is lightning:recordForm is supporting for custom settings?

I need to create a lightning component to Edit a particular Custom settings Record using the lightning:recordForm. But I couldn't able to achieve it and got the following error. I will share my code ...
3
votes
2answers
842 views

lightning:recordForm with lookup to Account Object does not work - Bug Identified (I believe)

Final update See my answer below for the issues. I believe there is a bug in the implementation as well. The lookup will not work if the field is not on the page layout configuration. The weird ...
0
votes
1answer
1k views

Preset a few fields in lightning:recordForm component

Is it possible to preset a few fields in lightning:recordForm component? For example, I have an object which has a master-detail field. And now I would like to have my lightning:recordForm being ...
1
vote
1answer
52 views

Merging multiple Field Sets to use only one general Save and Cancel Button using <lightning:recordForm>

I'm building a Lightning component page using multiple Field Sets which using tag so that every section has its own Save and Cancel button. I wanna make it simple and comfortable for the users so ...
6
votes
1answer
1k views

Lightning:recordForm cancel button unresponsive

I'm building out some community features and one of them is like a related list with a new button. When the user presses the new button, I am launching a modal window with another custom component ...
4
votes
1answer
669 views

Refreshing issues in lightning:recordViewForm

I'm having TestObject as parent object and New Custom Object having M-D relationship to it. TestObject having Min and Max Rollup summary fields which will rollup number field in child object. I was ...
0
votes
1answer
203 views

ONSUCCESS event doesn't fire on dynamically created recordForm component

I'm trying to get the saved data from my recordForm component handling the onsuccess event but the controller's function handling the event is not triggered. I think this happens because my component ...
5
votes
3answers
739 views

Lightning recordForm displaying stale data

After two days I'm out of ideas and hoping someone here could offer suggestions or even better -- tell me where I'm being silly! I am trying to refresh the view of the child (recordForm) but it is ...
3
votes
1answer
1k views

Lightning:recordForm onload() method to prepopulate fields on record creation

I am using lightning:recordForm to create a record creation form. I am trying to pre-populate some fields. My component: <aura:component description="replaceDuplicatesModal" controller="...
12
votes
5answers
3k views

Pre-populate field values in lightning:recordForm onload

I'm using lightning:recordForm to display create view for a custom sObject. It works as expected, but I cannot find a way to pre-populate some of the fields for create view, e.g. lookups. ...
6
votes
2answers
2k views

Issue with error messages on Lighting:recordform

There seems to be an issue with the error handling on lightning:recordForm, and some real limitations on lightning:recordEditForm. Trying to determine if this is a bug or a mistake on my part. ...
4
votes
0answers
483 views

Detecting Data Changes with lightning:recordform

how can one bind onchange event handlers to the fields of the lightning:recordform component? component.cmp <aura:attribute name="fieldsArray" type="String[]" default="['Subject','...
2
votes
1answer
1k views

lightning:recordForm does not display fields

I'm having trouble using the new lightning:recordForm component. Here is my code : <aura:attribute name="fieldsArray" type="String[]" default="['Name','Email','Phone','AccountId']" />...
1
vote
1answer
129 views

LightingInput for Address not setting default Country Code

I am using the new Lightning:recordForm with a list of fields. <lightning:recordForm objectApiName="Account" recordTypeId ="{!v.rtTypeId}" fields="{!v.acctFields}" ...
5
votes
2answers
2k views

Standard cancel button in lightning:recordform not closing the quick action dialogue

I am creating a lightning component which shows opportunity in edit mode using lightning:recordform tag(summer 18 salesforce release). Now when I am clicking on cancel button it should close the quick ...
7
votes
1answer
835 views

Show form with page layouts && intercept save … Lightning:recordForm / force:recordData

Somewhat flummoxed with this lightning component. The use case is simple: Intercept the save event on a record edit, grab the new field values and do 'stuff' before saving the record. Example User ...