-
Get the inserted record id in a upsert call?
I am doing following DML in my controller
upsert accountList Eid__c;
After upsert, I need the Id of only inserted Account
for(Account insertedAccount : accountList){System.debug('AccountId>>>'+insertedAccount.id+'<<<<AccountId');}
I am getting id of all account.
Log In to reply.
Popular Salesforce Blogs
10 Reasons to Switch On Salesforce Lightning
It's been close to 12 months since Salesforce propelled its greatest advancement yet, Lightning. The achievement checked considerably more than a facelift for our items.…
Close Case Button in Lightning Experience - Workaround
If you have Used Cases in Salesforce, I am sure you’re aware of the Closed Case layout. This is great, it lets you require the…
The Role of Salesforce Einstein in Marketing, Sales, and Services
Salesforce Einstein is an Artificial Intelligence technology launched for the Salesforce Customer Success Platform. With Salesforce Artificial Intelligence, you can increase the potential of marketing,…
Popular Salesforce Videos
Entrepreneurship in the Salesforce Ecosystem
The Salesforce Women’s Entrepreneur Group is a group of women who have founded and own businesses in the Salesforce ecosystem. Our goal is to inspire,…
How To Become A Salesforce Administrator | Salesforce Administrator Training
What does Salesforce developer do? Salesforce developers lead the testing and implementation of software development efforts, including coding, configuration, maintenance, installation, testing, and debugging, as…
Salesforce Pardot: 2020 Update
If you’re a current Salesforce user, you may be hearing a lot about Pardot these days. Perhaps you are using MailChimp, Campaign Monitor, or Constant…