You need to sign in to do that
Don't have an account?
Taylor Young
Record Locking in Future vs. Queueable Apex
I have an upload handling class that parses the information, finds the relevant objects, and updates them. After that occurs I pass the records to a class that creates Tasks depending on the values of certain fields.
As is, the Task creating class is Queueable Apex. But I can’t add the object id to the WhatId field of the Task because of record locking. Do you know any way to work around this? I have tried adding 'FOR UPDATE' to the initial query as suggested here: https://developer.salesforce.com/forums/?id=9060G000000I2r1QAC
Thank you!
As is, the Task creating class is Queueable Apex. But I can’t add the object id to the WhatId field of the Task because of record locking. Do you know any way to work around this? I have tried adding 'FOR UPDATE' to the initial query as suggested here: https://developer.salesforce.com/forums/?id=9060G000000I2r1QAC
Thank you!
Your query is answered here,
https://www.emizentech.com/blog/future-vs-queueable-apex.html
For further reference check this too,
https://www.apexhours.com/future-vs-queueable-apex/
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.