Activity Forums Salesforce® Discussions Is there any way to get the id’s of only inserted accounts not the updated accounts id? How this can be done through apex?

  • Surbhi

    Member
    August 30, 2016 at 5:41 PM

    Hi Pranav,

    Please refer below code:

    Account acct = new Account(Name=’SFDC Account’);
    insert acct;

    system.debug(“Inserted Account Id = “+acct.Id);

    As much I get from your question, this will give you id of inserted account. Please let me know if you have any query.

    Thanks

Log In to reply.