-
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 To Resolve When Salesforce Error Apex Heap Size Too Large
Salesforce upholds an Apex Heap Size Limit of 6MB for synchronous execution and 12MB for Asynchronous execution. The "Pinnacle stack size excessively huge" mistake happens…
Learn Everything About Salesforce: Top Tips From Students
Student life is always hectic. With an abundance of assignments, it is no surprise that students don’t have enough time to do sports and attend…
8 Ways a Salesforce LMS Integration Can Improve Customer Training
Integrating an LMS with Salesforce is beneficial as an LMS acts as a database of learning resources for your salesperson. It can also provide your employees with the band the positive behaviors…
Popular Salesforce Videos
Smart Merchandising with Salesforce Einstein AI
Smart Merchandising is a holistic tool that magically combines rich insights from site-wide search, navigation, purchases, and the customer’s current session with strategic business goals.…
Lesser Known VSCode Tips for Salesforce Developers
More Code, Less Work. Whether you are a beginner or an advanced developer, smart tips, and sharp tools can significantly improve your productivity. There are…
Salesforce Einstein Top FAQs'
We hear a lot of questions from people regarding Salesforce Einstein which is why we've answered them below. So that you have complete and top…