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 code
<template>
<lightning-record-form object-api-name={accountobject} columns ="2"
fields={fields} onsuccess={handleclick} >
</lightning-record-form>
</template>
createandUpdate.js
import { LightningElement} from 'lwc';
import Account_OBJECT from '@salesforce/schema/account';
import NAME_FIELD from '@salesforce/schema/account.name';
import Revenue_FIELD from '@salesforce/schema/account.annualRevenue';
import TYPE_FIELD from '@salesforce/schema/account.type';
import INDUSTRY_FIELD from '@salesforce/schema/account.Industry';
import Description_FIELD from '@salesforce/schema/account.Description';
import Phone_FIELD from '@salesforce/schema/account.Phone';
import {showToastEvent} from 'lightning/platformshowToastEvent';
export default class CreateandUpdate extends LightningElement {
accountobject=Account_OBJECT;
fields=[NAME_FIELD,Revenue_FIELD,TYPE_FIELD,INDUSTRY_FIELD,Description_FIELD,Phone_FIELD];
handleclick(){
const evt = new ShowToastEvent({
title:"account creted successfully",
variant: "success",
message:"record inserted",
});
this.dispatchEvent(evt);
}
}
createandUpdate.xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>51.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
<target>lightning__AppPage</target>
</targets>
</LightningComponentBundle>
help me out where i am going wrong