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
Padmashree MPadmashree M 

need to pass sobject parameters to queueable

I need to pass sobject as parameter using trigger to queuebale and have written below code, but facing error as 
Variable does not exist: Name
Variable does not exist: id
Constructor not defined: [ContactCreationQueueable].<Constructor>(List<Account>)

Queueable class:
public class ContactCreationQueueable implements Queueable{
    private List<Account> acctListToCreateContacts;
    public ContactCreationQueueable(List<Account> expectingListOfAccountsFromTrigger){
    public void execute(QueueableContext Qc){
        List<Contact> conListToInsert = new List<Contact>();
        for(Account acct : acctListToCreateContacts){
            Contact con = new Contact();
            con.LastName = acct.Name;
            con.AccountId =;
        insert conListToInsert;


Trigger code :
Trigger AccountTrigerForContacts on Account (after insert) {
    if(Trigger.isAfter && Trigger.isInsert){
        System.enqueueJob(new ContactCreationQueueable(;


Please help in resolving this error.