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
0 answers
26 views

LWC lightning-record-form and onChange events [duplicate]

I'm stuck, I've been trying to make sense of a simple component that should console.log the value of a lightning-record-form on the developer console. My .html file is quite simple <...
Juan's user avatar
  • 1
0 votes
0 answers
42 views

Use lightning-record-form with object Layout to display record

I'm currently having some issues with displaying a record of a custom object This occurs when a user that only has read access accesses this page - I'm currently trying to use lightning-record-form to ...
Kevin Yao's user avatar
  • 105
0 votes
1 answer
554 views

How to create Parent and Child records using Lightning Edit Form in LWC?

I have a requirement where user should be able to create Parent and child record with single button click on one page. For this I created 2 lightning-record-edit-form on the LWC, but unable to find a ...
Anjali's user avatar
  • 247
0 votes
0 answers
35 views

lightning-record-view-form / lightning-record-form - open hyperlink in new tab

These forms are pretty nice as they take away so much of grunt work out of the way and lets you have a nice form in minutes. However, I'd like to customise URL behaviour so my users wouldn't ...
dzh's user avatar
  • 4,016
0 votes
2 answers
559 views

Edit related child records in lightning record form

I have a requirement to display and edit related opportunity records of parent account. I am trying this requirement using apex and lightning record form, but no data is getting displayed. Please let ...
sourav guha's user avatar
7 votes
1 answer
2k views

How can I create a new record, with record type and default field values, presenting a standard layout and without navigating from the current page?

I am aware of the following options, but none of them quite do the job (and here's why): Option What it can and cannot do Aura component and the force:createRecord event Using this event I can open ...
Phil W's user avatar
  • 34.1k
0 votes
1 answer
1k views

How to import parent object field in lightning record form of child custom object?

There is Contact object as parent object and I have created a custom object called Vaccination_Information__c which is a child of Contact object. I want to include the contact name field from Contact ...
Celsy's user avatar
  • 1
0 votes
0 answers
164 views

Stopping record form from submitting

I created datatable with onrowselection and after selecting a row the details will pass to a record form for editing. Now I want to prevent the record form from submitting in a certain condition. I ...
4th Game Account's user avatar
0 votes
1 answer
112 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 ...
Tony Stark's user avatar
1 vote
1 answer
3k 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 ...
Steven Hodge's user avatar
0 votes
2 answers
1k 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 ...
Indresh Bhargav's user avatar
0 votes
1 answer
1k 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&...
AjaySFDC's user avatar
  • 618
1 vote
1 answer
2k 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 ...
MehSF's user avatar
  • 35
1 vote
1 answer
2k 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 ...
hamayoun's user avatar
  • 2,727
0 votes
0 answers
82 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=...
Rhonda Gutman's user avatar
1 vote
0 answers
260 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&...
Nicolás Abondano's user avatar
0 votes
1 answer
769 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=&...
unique user's user avatar
0 votes
0 answers
1k 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 ...
Giri Liyangi's user avatar
0 votes
1 answer
272 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 ...
Shivani Tanwar's user avatar
0 votes
2 answers
1k 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 ...
dan's user avatar
  • 103
1 vote
1 answer
1k 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, ...
Michael Batchelder's user avatar
0 votes
1 answer
911 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 ...
Andrew L.'s user avatar
  • 837
1 vote
1 answer
954 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 ...
Michael Batchelder's user avatar
0 votes
1 answer
1k 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 ...
Rahul Gawale's user avatar
  • 11.9k
3 votes
3 answers
2k 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"...
Danyright's user avatar
  • 131
0 votes
1 answer
391 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 ...
gjohnson282's user avatar
0 votes
1 answer
1k 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" ...
number41's user avatar
  • 928
0 votes
1 answer
1k 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 ...
Michael Batchelder's user avatar
0 votes
1 answer
227 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:...
Juliana's user avatar
1 vote
1 answer
4k 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 ...
Max's user avatar
  • 476
2 votes
1 answer
4k 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? ...
zaitsman's user avatar
  • 1,890
0 votes
1 answer
2k 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 ...
Mike Paisner's user avatar
0 votes
3 answers
5k 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?
Shiran's user avatar
  • 121
2 votes
4 answers
8k 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 ...
JodieM's user avatar
  • 1,175
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 ...
JodieM's user avatar
  • 1,175
0 votes
1 answer
1k 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=...
dsd's user avatar
  • 121
-1 votes
1 answer
245 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: ...
Rob Alexander's user avatar
1 vote
0 answers
273 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 ...
Manish Khade's user avatar
2 votes
2 answers
559 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 ...
Dangling Pointer's user avatar
0 votes
2 answers
479 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="...
Sklipus's user avatar
1 vote
1 answer
8k 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 ...
Davide Buoso's user avatar
0 votes
2 answers
2k 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, ...
Nevds's user avatar
  • 97
1 vote
0 answers
388 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 ...
apc's user avatar
  • 63
0 votes
1 answer
1k 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-...
User6670's user avatar
  • 2,976
2 votes
2 answers
4k 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 ...
user70147's user avatar
-1 votes
2 answers
3k 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 ...
Rick's 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: <...
salesforce-sas's 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 ...
Vinod G's user avatar
5 votes
2 answers
2k 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 ...
Brian Miller's user avatar
  • 5,132
2 votes
0 answers
493 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" ?
Ivan S.'s user avatar
  • 329