Activity Forums Salesforce® Discussions Database.insert(list,false) vs Database.insert(list)

  • Surbhi

    Member
    May 27, 2016 at 5:19 pm

    Hi Ajay,

    I can explain this with an example:

    Suppose if you are inserting 5 records. 3 of them have all the required field's values and remaining 2 records missing required field's values.

    In Salesforce, if you use Database.insert(list), it will thrown an exception and it will not insert any one of the records. But if you use Database.insert(list, false), it will insert 3 records successfully and rest 2 records(required fields missing) will not be inserted.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos