You need to sign in to do that
Don't have an account?
EagerToLearn
You have uncommitted work pending...
Hi,
ERROR: You have uncommitted work pending. Please commit or rollback before calling out.
I have read many posts regarding this issue but my sistuation is not like them! This is what I have and I am hoping that there is some kind of work-around; otherwise this entire 3 month effort is crapped!
Does anyone have a work-around to such a problem? Appreciate your support.
ERROR: You have uncommitted work pending. Please commit or rollback before calling out.
I have read many posts regarding this issue but my sistuation is not like them! This is what I have and I am hoping that there is some kind of work-around; otherwise this entire 3 month effort is crapped!
- I have trigger on the user object
- It calls a class with the @FUTURE
- It performs a REST callout to ALL our associated sandboxes and deactives the user that was deactivated from the client trigger side (prod), #1 above.
- On the service side (sandox(s) I deactivate the user(s) and call a Queueable routine to post a log entry on the sandbox(s) because otherwise, I get the MIX DML error (that was the work-around for that issue if I don't use Queueable.
- The service side sends a response back to the client (caller) with the details of what was written to the log on the sandbox(s).
- Using the Queueable feature on the client side I attempt to write to its log table but I get the error message in the subject of this post!
Does anyone have a work-around to such a problem? Appreciate your support.
I recommend using Platform events for line no 6.
--
Magulan Duraipandian
www.infallibletechie.com