+ Start a Discussion
Balaji Selva Sekaran 8Balaji Selva Sekaran 8 

Lightning recordForm is throwing me a blank screen

I am trying to create a case record using lightning recordForm by just simply giving layout type as Full, when i try creating record from the page after i click save it throws me blank page whereas the record got created in the object .

Am i missing something here please?
==========================================
<template>
    <div class="slds-box" style="background-color: lavender">
        <lightning-record-form columns="2" layout-type="full" object-api-name={Caseobject}>
        </lightning-record-form>
    </div>
</template>
============================================

import { LightningElement } from 'lwc';
import case_object from '@salesforce/schema/Case';
export default class CaseRecordForm extends LightningElement {
    Caseobject=case_object;
}
User-added imageUser-added image
AnkaiahAnkaiah (Salesforce Developers) 
Hi Balaji,

Refer the below links have solutions to create record using LWC.
https://www.salesforcecodecrack.com/2019/08/create-record-in-lightning-web.html
https://www.salesforcelwc.in/2019/04/how-to-create-record-in-lightning-web.html

If this helps, please mark it as best answer.

Thanks!!
david jemsdavid jems
The form loads in edit mode by default when you don't specify a record ID. Use objectApiName to pass the object API name for the record to be created. Specify the fields you want using the fields attribute, or use layoutType="Full" to load all fields in the full layout. MyInsuranceInfo (https://www.myinsuranceinfo.org/)
Balaji Selva Sekaran 8Balaji Selva Sekaran 8
I had found the issue in my code.

layout-type="full"  instead of full it should be Full.