function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sai ramsai ram 

how to create a case record using record-edit-form in lwc

<template>
    <lightning-record-edit-form object-api-name="Case">
        <lightning-messages>
        </lightning-messages>
        <lightning-output-field field-name="CaseNumber">
        </lightning-output-field>
        <lightning-input-field field-name="Subject">
        </lightning-input-field>
        <lightning-input-field field-name="PRODUCTSUBTYPE__c">
        </lightning-input-field>
        <lightning-input-field field-name="PRODUCTTYPE__c">
        </lightning-input-field>
        <lightning-input-field field-name="RMA__c">
        </lightning-input-field>
        <lightning-input-field field-name="FunctionalArea__c">
        </lightning-input-field>
        
        <lightning-button class="slds-m-top_small"
                          variant="brand"
                          type="submit"
                          name="Create"
                          label="Create">
        </lightning-button>
    </lightning-record-edit-form>
</template>
iam using above lines of code but iam unable create record
ShirishaShirisha (Salesforce Developers) 
Hi Sai,

Greetings!

Please find the sample code to create the record using lightning-record-edit-form in LWC in below blogs:

https://rajvakati.com/2019/02/16/lightning-record-edit-form/

http://www.infallibletechie.com/2019/11/lightning-record-edit-form-and.html

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Barthelemy Laurans 1Barthelemy Laurans 1
Hi,

You will find Salesforce documentation about what you're asking here : https://developer.salesforce.com/docs/component-library/bundle/lightning-record-form/documentation

If you have any questions regarding this, I'm happy to answer them.

Best regards,
Barthélemy
Walter Fernandez 11Walter Fernandez 11
Actually, those links altough give ideas on how to try to do it, doesn't help much. 
Barthelemy Laurans 1Barthelemy Laurans 1
I'm happy to answer your questions if you have any. Right now I can't help you if you don't tell what the actual issue is.