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.

Filter by
Sorted by
Tagged with
2
votes
2answers
66 views

field disppearing on lwc record form during edit

We have an LWC component that shows details of an Order. We are using lightning-record-form to show order fields to be able to edit if required. We can see the fields with inline edit icon next to ...
0
votes
2answers
102 views

lightning-record-form not work correct in Spring ‘20

I found that lightning-record-form does not work correct. <template> <lightning-record-form record-id="anyAccountId" object-api-name="Account" layout-type="...
0
votes
1answer
57 views

LWC setCustomValidity on lightning-input-field

I'm using a <lightning-record-edit-form> with <lightning-input-field> children. When required fields are not populated, it occurs the standard message "Complete this field". What I want ...
0
votes
2answers
46 views

LWC: lightning-record-form not respecting required attribute on Page Layout

I have the following LWC Component: " " I have created a Page Layout for the recordType and marked a few fields as required on the Page Layout. While the fields are being pulled into the layout, ...
0
votes
0answers
42 views

Null or ' ' values used to create empty space in lightining:recordform stopped working

I am using recordform with 3 columns and trying to put a blank value for middle column. the attribute value of null was working before now it stopped working, and there is no gap between fields. I ...
0
votes
1answer
52 views

how to remove “Added non-passive event listener to a scroll-blocking <some> event.” warning?

I am using lightning record form inside aura iteration like this which is visible on hover <aura:Iteration items="{!v.Accountscurrent}" var="acc" indexVar="index"> <span class=" icon slds-...
0
votes
2answers
628 views

Fields required at layout level are not required in lightning-record-form lwc

I am trying to create a new button for a Custom object to add it in community.On clicking the button lightning-record-form will be displayed in edit mode to show input fields of the layout but what ...
-1
votes
2answers
797 views

lightning-input-field not showing correctly for time (Lightning Web Components) [duplicate]

This happens both with the lightning-record-form, and using lightning-record-edit-form when defining a field with lightning-input-field with a "time" field. Instead of showing a dropdown list to pick ...
1
vote
0answers
733 views

Lightning RecordEditForm - getting error [object object] for few users

Problem: Many users are able to see a form but few users are not able to see the form and getting error [object object]. I am using lightning:recordEditForm as below in lightning record page: <...
0
votes
1answer
572 views

How to override Save button and show the popup in lightning-record-form of LWC [closed]

I have the requirement to show a WARNING POPUP / confirmation box when user click on save button in Record form of Lightning Web Components(LWC). Can i override save button and display confirm popup ...
5
votes
2answers
518 views

Detect lightning:recordForm change in mode attribute

I'm trying to disable some surrounding components based on the mode attribute within lightning:recordForm (i.e. anytime I'm in edit mode, I'd like to disable a lightning:buttonMenu that sits just ...
0
votes
2answers
516 views

LWC Composition for Custom Layout inside a lightning-record-form

I have a SObject with multiple display layouts. Now, I want a way to display a particular layout in my lightning-record-form with different lightning-input-field. I don't wanna attach all the fields ...
2
votes
0answers
125 views

LWC: Master-detail field default value in Lightning-record-form

Is there a way to assign default value for record's master-detail field on LWC component "lightning-record-form" ?
5
votes
1answer
543 views

How can I dynamically assign a value to a lightning record form?

For example, my component has the following section that displays a record form: <template if:true={showRecordForm}> <lightning-record-form object-api-name={sObjectApiName} ...
1
vote
0answers
20 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" ...
1
vote
1answer
732 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 ...
1
vote
0answers
349 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
280 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
68 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.
5
votes
2answers
1k 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
43 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
3k 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
237 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
549 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}" ...
1
vote
0answers
144 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
219 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
77 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 ...
6
votes
2answers
812 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
220 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
397 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 ...
5
votes
2answers
2k 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
2k 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
85 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
2k 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 ...
6
votes
1answer
935 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
286 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 ...
6
votes
4answers
1k 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
2k 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
8k 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. ...
9
votes
2answers
5k 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
685 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
2answers
2k 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
192 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
4k 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 ...
8
votes
1answer
1k 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 ...