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
Gaurav Jain 67Gaurav Jain 67 

I want to create a lightning component to take input from user e.g. Opportunity Name and create a new opportunity with some prepopulated values from the related account

Gaurav Jain 67Gaurav Jain 67
USe case is, I want to override NEW opportunity button with a lightning component to create a opportunity record. I want to create this opportunity from related list of Account so that the new opportunity gets prepopulated with some information from the account like Account Name, Mobile, email etc 
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi Gaurav,
For this requirement instead of lightning component you can also create a action in account to create a new opportunity record and set predefined values for fields you want.

Please refer below link which might help you in this
https://salesforce.stackexchange.com/questions/116697/create-record-in-lightning-with-populated-fields


Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards