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
Amruta ChaudharyAmruta Chaudhary 

Apex code creating records

i have two object workflow and Quote object and their is ' opportunity' field on workflow.
If opportunity field on workflow is null then we can able to create the quote record from workflow (through the button (create quote) which is present on workflow)
for this i need to write a apex code
can you please help me what will be the apex code for this ?
workflow - workflow_c
opportunity- opportunity_c
Quote- Quote_c
PriyaPriya (Salesforce Developers) 

The developer community recommends providing any attempts/code you've started, any errors you're getting, or where exactly you're struggling in achieving this while posting a question.