You need to sign in to do that
Don't have an account?

Error in updating the record from future method
Hi,
When I used executive account, I dont get this message but if I use account with limited privilges I see below error message and my object is not getting updated.
My flow :
1. Call apex method and insert a record
2. Call future method
3. Future method will call some external webservice and will return some id
4. Update the record in future method by assigning this value to one of field in object
5. Call update on the object
6. Future method ends here
Changes I made :
1. Changed edit permission in workflow from 'admin' to 'admin and current approver'
2. Provided edit pormission on that object field for every user
Please let me know if there is any issue in understanding this issue.
Thanks,
Abhishek
When I used executive account, I dont get this message but if I use account with limited privilges I see below error message and my object is not getting updated.
1 Update failed. First exception on row 0 with id a0ZR00000049iquMAA; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, This record has been locked, and changes cannot be made.: []
My flow :
1. Call apex method and insert a record
2. Call future method
3. Future method will call some external webservice and will return some id
4. Update the record in future method by assigning this value to one of field in object
5. Call update on the object
6. Future method ends here
Changes I made :
1. Changed edit permission in workflow from 'admin' to 'admin and current approver'
2. Provided edit pormission on that object field for every user
Please let me know if there is any issue in understanding this issue.
Thanks,
Abhishek
but verify, if all of your classes uses without sharing keyword so that the Apex code will run in system mode instead of running in user mode.