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
0
votes
1answer
28 views

Display State Picklist Values in Custom LWC Record-Edit-Form

I have a custom LWC that displays contact information to edit. One of the fields is the MailingState. Currently this field is a standard input field but I would like it to display as a picklist. Its ...
1
vote
1answer
62 views

Section headers in lightning-record-form

I am displaying a Full layout on Desktop using lightning-record-form for my custom object. The order of fields matches my layout, however all section headers are hidden. Is there a way to show them? ...
0
votes
1answer
57 views

How to create blank space in lightning-record-form?

I am using a lightning-record-form to enable view and and edit. I have specified a custom list of fields displayed in two columns. The fields populate in the columns left to right and then top to ...
0
votes
2answers
77 views

How to override LWC lightning record form Cancel button

I'm using a lightning record form to create a new cord in a Customer Community. Just wondering is there any way to override the standard 'Cancel' button behaviour?
2
votes
4answers
147 views

Simplest way to display values from field names listed in design attributes

I'm trying to write a really simple component that takes the field names from the design attributes and displays only the field values, not the standard lightning-output-field. There are two(?) ways ...
0
votes
0answers
68 views

Building a better Related Record Component in LWC?

I'm just starting learning LWCs and I thought I'd tackle something I know well which is Quick Actions and Related Record Components. They are fabulous, but have a few limitations (like not being able ...
0
votes
1answer
53 views

Get values and fields from “lightning:recordForm” component

I'm creating a form using "lightning:recordForm". I put the object's Id, the object's type and what fields should be viewed. <lightning:recordForm aura:id="myObject" recordId=...
-1
votes
1answer
69 views

Why am I getting a read-only error when trying to use lightning:recordForm to create an Account?

Any ideas why I'm getting the following error when trying to execute the code below?: Action failed: c:CreateAccount$controller$handleAccountFormLoad ["Phone" is read-only] Failing descriptor: ...
1
vote
0answers
53 views

Time field values not displayed in Lightning component when used recordForm

I have created one lightning component in which displaying record using lightning:recordForm. But, for the fields with type as Time value is not getting displayed, but if I click on edit then value ...
2
votes
2answers
94 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
132 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
717 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
114 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, ...
1
vote
0answers
61 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
167 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
1k 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
1k 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 ...
3
votes
1answer
1k 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
844 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
717 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
820 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
162 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
778 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
23 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
1k 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
452 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
348 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
78 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
2k 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
45 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:...
2
votes
2answers
4k 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
320 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
694 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
162 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
245 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
79 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
1k 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
244 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
445 views

Is lightning:recordForm support 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 ...
6
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
3k 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
109 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
3k 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
1k 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
308 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
2k 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
3k 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
10k 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
6k 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
757 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','...