You need to sign in to do that
Don't have an account?
Jack Volkov
Does unlock() method work for records locked by time-based workflows too?
Will unlock() work for records locked by workflow rules as well, or only for records locked by an approval process?
https://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_apex_approval_locks_unlocks.htm
https://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_apex_approval_locks_unlocks.htm
Create a Record Type called Locked_Readonly and the make all field are readonly with Unlock button.
Try to update record type Id suing workflow rule. add the time trigger to change the record type time bsed.
for Unlock record try to assign base record type id throug code.
hope it may helps you.
Thanks
Karthik
Yes its possbile to lock /unlock the records using apex code.
Here the sample code for unlock the record using apex . and i have added link for Idea Details from Salesfroce. the 2 linke are very useful to you.
https://success.salesforce.com/answers?id=90630000000gmpNAAQ
https://success.salesforce.com/ideaView?id=08730000000BrZOAA0
i hope it may help you to solve the problem.
Thanks
karthik