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
1 answer
21 views

recordform is not showing all fields on clicking different buttons

I have created a beer explorer using aura components. So below I have created a Explorer parent component and added beer list component as child and in this I am adding beerdetails as child. So when I ...
user avatar
1 vote
1 answer
183 views

Creating record via lightning-record-edit-form. Record not saving and no errors

I've created a lightning record edit form that should create a brand new account record. I have a onsuccess={handleSuccess} and onerror={handleError} defined, but when pressing save the record is not ...
user avatar
0 votes
1 answer
166 views

lightning-record-edit-form record id not binding

I have a record edit form on which I'm binding my record id. When I pass record ID as hardcoded form then the lightning record edit form gets loaded but when I'm passing that ID dynamically record ...
user avatar
0 votes
1 answer
170 views

How to add dynamic fields to "onsubmit" method in lightning-record-form in LWC

I'm new to Lightning Web Components development. I have 3 fields to populate values, out of which 2 are picklist fields which requires user input, to which i use lightning-record-form with "edit&...
user avatar
  • 585
0 votes
1 answer
158 views

How to get Fixed footer (Save/Cancel) for lightning-record-form?

Using Lightning-record-form we get standard save and cancel buttons in UI. But these buttons appear to not have fixed docked footer. User needs to scroll down to see the buttons. I am trying to ...
user avatar
  • 25
1 vote
1 answer
383 views

Dynamic Forms and lightning-record-form

I have started to read about and play around with Dynamic Forms. My question is this: if I setup an object to have a Dynamic Form as the lightning record page, and then build a custom LWC which ...
user avatar
  • 2,601
0 votes
0 answers
62 views

Lightning help with Apex array sort for:each iteration

I have a tabset that is rendering article records. Does someone have a lightning example how I would create the index to set the tab title and the order? HTML <template> <lightning-card title=...
user avatar
1 vote
0 answers
55 views

Change record id of lightning-record-form

I want to change the ID of the form but it doesn't load the new record. I have something like this: <div class="slds-modal__content slds-var-p-around_medium" id="modal-content-id-1&...
user avatar
0 votes
1 answer
98 views

Can I change the "lightning-record-form"?

Here is my code: <div if:true={showStepOne}> <div role="dialog" class="slds-modal slds-fade-in-open "> <div class=&...
user avatar
0 votes
0 answers
255 views

Standard cancel button in lightning:recordform not closing the component

https://imgur.com/iRrojS1-> [Screenshot link 1] https://imgur.com/a/RqFM2rI-> [Screenshot link 2] I was trying to create a new contact, by filling in the details I closed the component by ...
user avatar
0 votes
1 answer
78 views

error on page while displaying lwc component on record page

i want to create account records using lwc with its 6 fields. code was deployed successfully but when i deployed it on page it gives error-the page has error you might need to refresh it. here is my ...
user avatar
0 votes
2 answers
567 views

Multiple Users and LWC Data Refreshing

How would I update the data/view of another user when one user makes changes to a record via a lightning-record-form LWC? For example, User 1 edits an Account record and changes the phone number via ...
user avatar
  • 103
0 votes
1 answer
196 views

How to validate fields programmatically in a lightning-record-form

I have a simple lightning-record-form. At the time of submit, I need to validate if the values are valid because I am implementing a "save and add next" button that saves the current entry, ...
user avatar
0 votes
1 answer
386 views

LWC Lightning Record Form Submits on Enter in Input Field

This may be default behavior, but I'm having an issue with using the Lightning Record Form. Basically, if the user is inputting data into a field and presses enter the form will submit. I don't see an ...
user avatar
  • 765
1 vote
1 answer
459 views

lightning-record-form in an aura parent component "Save and Next" button. How to set mode and clear record?

I have a lightning-record-form LWC component wrapped in an aura parent component so I can use it as a button on my Quote records. The lightning-record-form comes with cancel and save buttons for free ...
user avatar
0 votes
1 answer
554 views

Record Form and Record Edit form showing Id on the output field (lookup) instead of record name

I am using lightning-record-form and lightning-record-edit-form to display some records where I have several lookup-fields displayed, the lookup fields when rendered as output, should show the names ...
user avatar
  • 10.4k
3 votes
3 answers
1k views

LWC lightning-record-form Time field edit

I have a lightning-record-form for a custom object, which I show and allow to edit with the basic element's features: <lightning-record-form record-id={opId} object-api-name="Operation__c"...
user avatar
  • 131
0 votes
1 answer
226 views

Preventing odd number of fields in lightning:recordForm from spanning 2 columns

dev noob here -- My company has been using this aura/lightning component on many of our lightning pages and it works very well. We borrowed the idea from the example in the link below. It's extremely ...
user avatar
0 votes
1 answer
730 views

LWC - Error passing @api values as strings to "fields" parameter for lightning-record-form

I am writing a component that allows the user to designate the API names of the fields they want to see in a related list. I am trying to pass these API field names into the "fields" ...
user avatar
  • 628
0 votes
1 answer
660 views

lightning-record-form in simple modal displays all fields squished up to the left side of the dialog

I am having a problem with a lightning-record-form within a modal. It all works as expected except that the fields and labels are squished up against the left-side of the dialog. I can't figure out ...
user avatar
0 votes
1 answer
82 views

Save many records at once using "recordForm"

How do I save many records at once by clicking the Save button? I am not able to make the controller "handleSubmit". Please help me? <aura:component implements="flexipage:...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
  • 466
1 vote
1 answer
2k 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? ...
user avatar
  • 1,566
0 votes
1 answer
1k 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 ...
user avatar
0 votes
2 answers
2k 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?
user avatar
  • 89
2 votes
4 answers
3k 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 ...
user avatar
  • 1,160
0 votes
0 answers
2k 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 ...
user avatar
  • 1,160
0 votes
1 answer
613 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=...
user avatar
  • 111
-1 votes
1 answer
193 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: ...
user avatar
1 vote
0 answers
226 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 ...
user avatar
2 votes
2 answers
297 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 ...
user avatar
0 votes
2 answers
316 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="...
user avatar
1 vote
1 answer
7k 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 ...
user avatar
0 votes
2 answers
807 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, ...
user avatar
  • 95
1 vote
0 answers
249 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 ...
user avatar
0 votes
1 answer
809 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-...
user avatar
  • 2,804
1 vote
2 answers
3k 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 ...
user avatar
-1 votes
2 answers
2k 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 ...
user avatar
  • 39
3 votes
1 answer
2k 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: <...
user avatar
0 votes
1 answer
2k 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 ...
user avatar
5 votes
2 answers
1k 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 ...
user avatar
  • 4,642
2 votes
0 answers
371 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" ?
user avatar
  • 309
5 votes
1 answer
2k 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} ...
user avatar
1 vote
0 answers
31 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" ...
user avatar
  • 12.6k
1 vote
1 answer
2k 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 ...
user avatar
1 vote
0 answers
725 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 '@...
user avatar
0 votes
1 answer
712 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 ...
user avatar
  • 31
0 votes
1 answer
83 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.
user avatar
5 votes
2 answers
3k 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 ...
user avatar
  • 4,642
1 vote
0 answers
56 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:...
user avatar