よく書く内容なので、メモとして残しましょう!
オブジェクト型に新規レコードの作成
apex
Account acc = new Account(name = '株式会社テスト');
insert acc;
オブジェクトリスト型に新規レコードの作成
apex
List<Account> accList = new List<Account>();
accList.add(new Account(name = '株式会社テスト'));
insert accList;
よく書く内容なので、メモとして残しましょう!
オブジェクト型に新規レコードの作成
Account acc = new Account(name = '株式会社テスト');
insert acc;
オブジェクトリスト型に新規レコードの作成
List<Account> accList = new List<Account>();
accList.add(new Account(name = '株式会社テスト'));
insert accList;
Register as a new user and use Qiita more conveniently