-
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
All About Batch Class in Salesforce | The Developer Guide
Batch Apex is used to run large jobs (think thousands or millions of records!) that would exceed normal processing limits. Each time you invoke a…
How to Find a Salesforce Partner: Guide on Evaluation Criteria & Cost Range
Despite Salesforce having powerful out-of-the-box solutions and features, at certain stages of the business lifecycle, it requires customizations, integration, and other configurations to be legally…
What are Field Dependencies in Salesforce in 2023? | All You Need to Know
Salesforce is a powerful CRM platform that allows businesses to customize and tailor the software to their specific needs. One of the ways this is…
Popular Salesforce Videos
Integrate Salesforce with External System using REST API
In this video, Path to Code explains the following topics: - What is API? - Introduction to REST API - Using cURL to consume Rest…
Creating a Rollup Using DLRS | Salesforce Tutorial
In certain situations, an object does not support a roll-up, or the relationship is not permitted. Learn how to make it possible by using the…
Custom Button URL Hacking in Salesforce Lightning Experience vs Salesforce Classic
Custom Button URL Hacking in Salesforce Lightning Experience vs Salesforce Classic Custom button URL Hacking approach in Salesforce Classic Custom button URL Hacking approach in…