オブジェクトがレコードとしてDBに登録されるとIDが取得できるようになる。
Account a = new Account( name = 'テストアカウント' ); System.debug(a.id); // これはnull insert a; System.debug(a.id); // これはID(18桁の文字列)が返る
へー。
新たにSOQL発行してオブジェクトを取得し直さなくてもいいんですね。
オブジェクトがレコードとしてDBに登録されるとIDが取得できるようになる。
Account a = new Account( name = 'テストアカウント' ); System.debug(a.id); // これはnull insert a; System.debug(a.id); // これはID(18桁の文字列)が返る
へー。
新たにSOQL発行してオブジェクトを取得し直さなくてもいいんですね。