-
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
How Do Salesforce AppExchange Apps Drive Business Growth?
Why do some AppExchange apps become huge successes while others barely get noticed? The secret lies in smart planning. AppExchange connects app developers with millions…
What is Schema Builder in Salesforce? | All You Need to Know
Schema Builder is a graphical tool in Salesforce that allows you to create, modify, and visualize data models of your Salesforce organization. It provides an…
Salesforce Service Cloud Implementation 2025: Boost Customer Satisfaction and Efficiency
Customer expectations are higher than ever—and in 2025, businesses can’t afford to deliver anything less than exceptional service. To stay ahead, organizations are turning to…
Popular Salesforce Videos
How you can Increase your Salesforce Efficiency and Productivity
In this video, Brad discusses how to increase your workplace efficiency and productivity using various Google Chrome extensions and techniques. As always, we have linked…
Salesforce Stock CRM Huge News!
Why is Salesforce Stock CRM Stock going UP? Is Salesforce stock a buy? Should I buy CRM Stock? Is Salesforce stock a good investment? In…
Salesforce Apex Trigger Best Practices | Learn Salesforce Series By Algoworks
In this video, the following points will be covered - 1. One Trigger Per Object 2. Logic-less Triggers 3. Context-Specific Handler Methods 4. Code Bulkification…