Skip to main content

// Create the account sObject     Account acct = new Account(Name='Sown IO', Phone='866-123-1234', NumberOfEmployees=20000);    // Insert the account by using DML  insert acct;

 

Line: 3, Column: 16 Invalid constructor syntax, name=value pairs can only be used for SObjects: Account

2 answers
  1. Oct 12, 2021, 3:37 PM

    Great!! I was wondering why it is giving error since the code looks allright!!

0/9000