-
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
Import and Export Data from Salesforce using Talend
Talking about Salesforce the transfer of data does not fall under a very cumbersome category. There are myriad tools like Salesforce Dataloader.io which have rather…
Salesforce Acquisitions 2019: How Salesforce Made Its Mark This Year
Salesforce, the world’s #1 CRM, has made many acquisitions in recent years. A few of them have even reached up to billions of dollars. The…
Popular Salesforce Videos
How to use Einstein Engagement Scoring in Salesforce Marketing Cloud
Cameron Robert shows how to gain actionable insights from the Einstein Engagement Scoring Dashboard in Salesforce Marketing Cloud, and talks through a few activity ideas…
Pardot Engagement Studio | Salesforce
Learn how to use Pardot Engagement Studio to engage and attract prospective students. Do let us know in the comment section if you have any…
Salesforce lightning customize record page: Build a Custom Record Page
Salesforce Lightning Experience comes with a slick user interface that is easy to navigate and even easier to use right from the beginning. Lightning is…