-
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

Strategies to Boost Nonprofit's Efficiency with Tableau CRM | Salesforce
With the Salesforce technology, known as Tableau CRM users can make data-driven decisions while saving a ton of time and money thanks to AI features…

How Businesses Can Take Benefits of Salesforce to Improve Marketing Efforts?
Salesforce is the world’s number one CRM provider with an illustrious range of products. One of the most important products among all is Salesforce Marketing…

Send Survey Email On Case Closure on Case without using Trigger and Apex Class
Send Survey Email on Case Closure We can create Survey Emails without coding and send them to any status of case closure. Use Flow Builder…
Popular Salesforce Videos
Allies Unite at Dreamforce 2019! Datafam march to trailblazers, Drumrolls!
mid laughter and boisterous conversations at Dreamforest, Datafam - the Tableau workforce - turned all heads with a remarkable entry marked with riotous sounds and…
Salesforce Consultant | A Day in the life
The Salesforce ecosystem is expected to create over 3.3 million new software jobs by 2022. The demand for people who are willing to learn Salesforce…
Future of Salesforce Jobs | The Shrey Sharma Show
Salesforce saw a 38% rise in its jobs listings from 2020-2021 and 4.2M jobs will be created in the Salesforce ecosystem by 2024. Watch the…