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
Mayuri NehulMayuri Nehul 

lwc-how to create custom object using LWC

Hi Team,
I am new to Salesforce. I have a task to create an app using LWC(Everything needs to create using coding and LWC). I have created fields using LWC but haven't created any object. Can anyone please help with it how to create objects using LWC.
I need to create a controller for the same but I don't have any object reference for it. Your help would be appreciated
Thanks in advance.
SwethaSwetha (Salesforce Developers) 
HI Mayuri,
This post should answer your question


Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Mayuri NehulMayuri Nehul
Hi Swetha,

Thanks for your reply.
I have referred to your reference document but there they have referred object which is already created in UI.
I want to create object by using Apex/LWC without using any manual activity.
Can you please help me how can I achieve this using Apex/LWC. It will be helpful if you can share any sample code for the same.
SwethaSwetha (Salesforce Developers) 
HI Mayuri,
You can create a custom object using Metadata API
Can you try the steps mentioned in the comments of

Mayuri NehulMayuri Nehul
Hi Shweta,

Thanks for your reply.
I will go through these documents will get back to you if I have any doubts on it.
Appreciated your help.

Thank you