I am trying to understand how insertAsync(sobjects, callback) works with processSave(saveResult)

I went through the following two documentations, but couldn't find an example anywhere




These methods work for external objects. You will need to create a class that extends Database.AsyncSaveCallback and override the

public void processSave(Database.SaveResult saveResult)

method. Then pass an instance of this class to insertAsync method written in another class. The results from your insertAsync method will be passed to this class where you can do the processing.

See example here:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.