You need to sign in to do that
Don't have an account?
Kevin Desai
ID after getting inserted via a List
Hello,
Is there any way to get the ID of all the records that are getting inserted or updated via a list?
For example, To get the ID of a single record, you would write :
Account a = new Account();
a.Name = 'Test Account';
insert a;
system.debug('----Inserted Account ID ----'+a.Id);
I want the same while using list.
Is there any way to get the ID of all the records that are getting inserted or updated via a list?
For example, To get the ID of a single record, you would write :
Account a = new Account();
a.Name = 'Test Account';
insert a;
system.debug('----Inserted Account ID ----'+a.Id);
I want the same while using list.
If this helps, mark this as best answer
Thanks,
N.J
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_database_saveresult.htm