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
PAWAN THOSARPAWAN THOSAR 

for dml operation ,Write an apex Class, to Insert a Lead Record inside the Object.

Best Answer chosen by PAWAN THOSAR
Asakti Dhir 32Asakti Dhir 32
Lead l= new Lead(Company = 'Apple', LastName = 'John Doe',Email ='abc@gmail.com');
insert l;
above is the code to insert a single lead record.